Add isolated UAT and production environments
This commit is contained in:
@@ -4,6 +4,8 @@ ARG GODOT_VERSION=4.6.2
|
||||
ARG GODOT_RELEASE=${GODOT_VERSION}-stable
|
||||
ARG GODOT_TEMPLATE_DIR=${GODOT_VERSION}.stable
|
||||
ARG BUILD_REVISION=development
|
||||
ARG DEPLOYMENT_ENVIRONMENT=production
|
||||
ARG PUBLIC_API_ORIGIN=https://s3q.ranaze.com
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
@@ -30,6 +32,8 @@ WORKDIR /src
|
||||
COPY . .
|
||||
RUN mkdir -p /build \
|
||||
&& sed -i "s|build_revision=\"development\"|build_revision=\"${BUILD_REVISION}\"|" project.godot \
|
||||
&& sed -i "s|deployment_environment=\"development\"|deployment_environment=\"${DEPLOYMENT_ENVIRONMENT}\"|" project.godot \
|
||||
&& sed -i "s|https://s3q.ranaze.com|${PUBLIC_API_ORIGIN}|g" project.godot \
|
||||
&& sed -i "s|custom_template/release=\"\"|custom_template/release=\"/root/.local/share/godot/export_templates/${GODOT_TEMPLATE_DIR}/web_nothreads_release.zip\"|" export_presets.cfg \
|
||||
&& godot --headless --editor --path /src --quit \
|
||||
&& godot --verbose --headless --path /src --export-release Web /build/index.html \
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: step3-web
|
||||
labels:
|
||||
app: step3-web
|
||||
spec:
|
||||
replicas: 2
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0
|
||||
maxSurge: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: step3-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: step3-web
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: step3-web:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 128Mi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 2
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: step3-web
|
||||
labels:
|
||||
app: step3-web
|
||||
spec:
|
||||
selector:
|
||||
app: step3-web
|
||||
type: NodePort
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
nodePort: 30089
|
||||
+2
-4
@@ -14,10 +14,8 @@ server {
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
proxy_pass https://s3q.ranaze.com;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_ssl_name s3q.ranaze.com;
|
||||
proxy_set_header Host s3q.ranaze.com;
|
||||
proxy_pass http://step3-api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_connect_timeout 10s;
|
||||
|
||||
Reference in New Issue
Block a user