dek env separation volumes, etc.

This commit is contained in:
Josh 2025-08-08 18:29:16 +00:00
parent cdc53e3141
commit ef9085b72e
2 changed files with 14 additions and 4 deletions

2
.env
View File

@ -2,7 +2,7 @@ CORS_ALLOWED_ORIGINS=https://dev1.aptivaai.com,http://34.16.120.118:3000,http://
SERVER1_PORT=5000
SERVER2_PORT=5001
SERVER3_PORT=5002
IMG_TAG=c00494a-202508081456
IMG_TAG=6d057fb-202508081826
ENV_NAME=dev
PROJECT=aptivaai-dev

View File

@ -8,9 +8,17 @@ x-env: &with-env
restart: unless-stopped
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:
<<: *with-env
depends_on: [dek-init]
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server1:${IMG_TAG}
user: "1000:1000"
read_only: true
@ -41,7 +49,7 @@ services:
volumes:
- ./salary_info.db:/app/salary_info.db:ro
- ./user_profile.db:/app/user_profile.db
- dek-vol:/run/secrets:rw
- dek-vol:/run/secrets/dev:rw
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER1_PORT}/healthz || exit 1"]
interval: 30s
@ -50,6 +58,7 @@ services:
# ───────────────────────────── server2 ─────────────────────────────
server2:
depends_on: [dek-init]
<<: *with-env
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server2:${IMG_TAG}
user: "1000:1000"
@ -85,7 +94,7 @@ services:
- ./public:/app/public:ro
- ./salary_info.db:/app/salary_info.db:ro
- ./user_profile.db:/app/user_profile.db
- dek-vol:/run/secrets:ro
- dek-vol:/run/secrets/dev:ro
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER2_PORT}/healthz || exit 1"]
interval: 30s
@ -94,6 +103,7 @@ services:
# ───────────────────────────── server3 ─────────────────────────────
server3:
depends_on: [dek-init]
<<: *with-env
image: us-central1-docker.pkg.dev/aptivaai-dev/aptiva-repo/server3:${IMG_TAG}
user: "1000:1000"
@ -136,7 +146,7 @@ services:
volumes:
- ./salary_info.db:/app/salary_info.db:ro
- ./user_profile.db:/app/user_profile.db
- dek-vol:/run/secrets:ro
- dek-vol:/run/secrets/dev:ro
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${SERVER3_PORT}/healthz || exit 1"]
interval: 30s