feat: update docker compose for prod

This commit is contained in:
Enno Gelhaus
2026-06-03 18:04:46 +02:00
parent 2084f12a07
commit 0b5ca0e32d
2 changed files with 65 additions and 11 deletions
+1
View File
@@ -0,0 +1 @@
.vscode
+64 -11
View File
@@ -117,11 +117,19 @@ services:
networks:
- postiz-network
- temporal-network
healthcheck:
test: ["CMD", "node", "-e", "const r=require('http').get('http://localhost:5000/',res=>process.exit(res.statusCode<500?0:1));r.on('error',()=>process.exit(1));r.setTimeout(4000,()=>{r.destroy();process.exit(1)})"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
depends_on:
postiz-postgres:
condition: service_healthy
postiz-redis:
condition: service_healthy
temporal:
condition: service_healthy
postiz-postgres:
image: postgres:17-alpine
@@ -136,19 +144,21 @@ services:
networks:
- postiz-network
healthcheck:
test: pg_isready -U postiz-user -d postiz-db-local
test: ["CMD-SHELL", "pg_isready -U postiz-user -d postiz-db-local"]
interval: 10s
timeout: 3s
retries: 3
timeout: 5s
retries: 5
start_period: 10s
postiz-redis:
image: redis:7.2
container_name: postiz-redis
restart: always
healthcheck:
test: redis-cli ping
test: ["CMD-SHELL", "redis-cli ping | grep -q PONG"]
interval: 10s
timeout: 3s
retries: 3
timeout: 5s
retries: 5
start_period: 5s
volumes:
- postiz-redis-data:/data
networks:
@@ -156,8 +166,10 @@ services:
# For Application Monitoring / Debugging
spotlight:
profiles: [debug]
pull_policy: always
container_name: spotlight
restart: unless-stopped
ports:
- 8969:8969/tcp
image: ghcr.io/getsentry/spotlight:latest
@@ -170,6 +182,7 @@ services:
temporal-elasticsearch:
container_name: temporal-elasticsearch
image: elasticsearch:7.17.27
restart: always
environment:
- cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb
@@ -182,12 +195,19 @@ services:
- temporal-network
expose:
- 9200
healthcheck:
test: ["CMD-SHELL", "curl -fsS \"http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s\" || exit 1"]
interval: 10s
timeout: 10s
retries: 10
start_period: 60s
volumes:
- /var/lib/elasticsearch/data
- temporal-elasticsearch-data:/usr/share/elasticsearch/data
temporal-postgresql:
container_name: temporal-postgresql
image: postgres:16
restart: always
environment:
POSTGRES_PASSWORD: temporal
POSTGRES_USER: temporal
@@ -195,17 +215,26 @@ services:
- temporal-network
expose:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U temporal"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
- /var/lib/postgresql/data
- temporal-postgres-data:/var/lib/postgresql/data
temporal:
container_name: temporal
restart: always
ports:
- '7233:7233'
image: temporalio/auto-setup:1.28.1
depends_on:
- temporal-postgresql
- temporal-elasticsearch
temporal-postgresql:
condition: service_healthy
temporal-elasticsearch:
condition: service_healthy
environment:
- DB=postgres12
- DB_PORT=5432
@@ -219,6 +248,12 @@ services:
- TEMPORAL_NAMESPACE=default
networks:
- temporal-network
healthcheck:
test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "temporal:7233"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
@@ -227,6 +262,7 @@ services:
temporal-admin-tools:
container_name: temporal-admin-tools
image: temporalio/admin-tools:1.28.1-tctl-1.18.4-cli-1.4.1
restart: on-failure
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
@@ -234,12 +270,14 @@ services:
- temporal-network
stdin_open: true
depends_on:
- temporal
temporal:
condition: service_healthy
tty: true
temporal-ui:
container_name: temporal-ui
image: temporalio/ui:2.34.0
restart: always
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://127.0.0.1:3000
@@ -247,6 +285,15 @@ services:
- temporal-network
ports:
- '8080:8080'
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 5s
retries: 5
start_period: 20s
depends_on:
temporal:
condition: service_healthy
volumes:
postgres-volume:
@@ -261,6 +308,12 @@ volumes:
postiz-uploads:
external: false
temporal-postgres-data:
external: false
temporal-elasticsearch-data:
external: false
networks:
postiz-network:
external: false