dek env separation volumes, etc.
This commit is contained in:
parent
cdc53e3141
commit
ef9085b72e
2
.env
2
.env
@ -2,7 +2,7 @@ CORS_ALLOWED_ORIGINS=https://dev1.aptivaai.com,http://34.16.120.118:3000,http://
|
|||||||
SERVER1_PORT=5000
|
SERVER1_PORT=5000
|
||||||
SERVER2_PORT=5001
|
SERVER2_PORT=5001
|
||||||
SERVER3_PORT=5002
|
SERVER3_PORT=5002
|
||||||
IMG_TAG=c00494a-202508081456
|
IMG_TAG=6d057fb-202508081826
|
||||||
|
|
||||||
ENV_NAME=dev
|
ENV_NAME=dev
|
||||||
PROJECT=aptivaai-dev
|
PROJECT=aptivaai-dev
|
@ -8,9 +8,17 @@ x-env: &with-env
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
dek-init:
|
||||||
|
image: busybox:1.36
|
||||||
|
user: "0:0"
|
||||||
|
command: sh -lc 'mkdir -p /run/secrets/dev && chown -R 1000:1000 /run/secrets'
|
||||||
|
volumes:
|
||||||
|
- dek-vol:/run/secrets
|
||||||
|
restart: "no"
|
||||||
# ───────────────────────────── server1 ─────────────────────────────
|
# ───────────────────────────── server1 ─────────────────────────────
|
||||||
server1:
|
server1:
|
||||||
<<: *with-env
|
<<: *with-env
|
||||||
|
depends_on: [dek-init]
|
||||||
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server1:${IMG_TAG}
|
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server1:${IMG_TAG}
|
||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
read_only: true
|
read_only: true
|
||||||
@ -41,7 +49,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./salary_info.db:/app/salary_info.db:ro
|
- ./salary_info.db:/app/salary_info.db:ro
|
||||||
- ./user_profile.db:/app/user_profile.db
|
- ./user_profile.db:/app/user_profile.db
|
||||||
- dek-vol:/run/secrets:rw
|
- dek-vol:/run/secrets/dev:rw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER1_PORT}/healthz || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER1_PORT}/healthz || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -50,6 +58,7 @@ services:
|
|||||||
|
|
||||||
# ───────────────────────────── server2 ─────────────────────────────
|
# ───────────────────────────── server2 ─────────────────────────────
|
||||||
server2:
|
server2:
|
||||||
|
depends_on: [dek-init]
|
||||||
<<: *with-env
|
<<: *with-env
|
||||||
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server2:${IMG_TAG}
|
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server2:${IMG_TAG}
|
||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
@ -85,7 +94,7 @@ services:
|
|||||||
- ./public:/app/public:ro
|
- ./public:/app/public:ro
|
||||||
- ./salary_info.db:/app/salary_info.db:ro
|
- ./salary_info.db:/app/salary_info.db:ro
|
||||||
- ./user_profile.db:/app/user_profile.db
|
- ./user_profile.db:/app/user_profile.db
|
||||||
- dek-vol:/run/secrets:ro
|
- dek-vol:/run/secrets/dev:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER2_PORT}/healthz || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER2_PORT}/healthz || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -94,6 +103,7 @@ services:
|
|||||||
|
|
||||||
# ───────────────────────────── server3 ─────────────────────────────
|
# ───────────────────────────── server3 ─────────────────────────────
|
||||||
server3:
|
server3:
|
||||||
|
depends_on: [dek-init]
|
||||||
<<: *with-env
|
<<: *with-env
|
||||||
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server3:${IMG_TAG}
|
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server3:${IMG_TAG}
|
||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
@ -136,7 +146,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./salary_info.db:/app/salary_info.db:ro
|
- ./salary_info.db:/app/salary_info.db:ro
|
||||||
- ./user_profile.db:/app/user_profile.db
|
- ./user_profile.db:/app/user_profile.db
|
||||||
- dek-vol:/run/secrets:ro
|
- dek-vol:/run/secrets/dev:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER3_PORT}/healthz || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER3_PORT}/healthz || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
Loading…
Reference in New Issue
Block a user