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: networks:
- postiz-network - postiz-network
- temporal-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: depends_on:
postiz-postgres: postiz-postgres:
condition: service_healthy condition: service_healthy
postiz-redis: postiz-redis:
condition: service_healthy condition: service_healthy
temporal:
condition: service_healthy
postiz-postgres: postiz-postgres:
image: postgres:17-alpine image: postgres:17-alpine
@@ -136,19 +144,21 @@ services:
networks: networks:
- postiz-network - postiz-network
healthcheck: 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 interval: 10s
timeout: 3s timeout: 5s
retries: 3 retries: 5
start_period: 10s
postiz-redis: postiz-redis:
image: redis:7.2 image: redis:7.2
container_name: postiz-redis container_name: postiz-redis
restart: always restart: always
healthcheck: healthcheck:
test: redis-cli ping test: ["CMD-SHELL", "redis-cli ping | grep -q PONG"]
interval: 10s interval: 10s
timeout: 3s timeout: 5s
retries: 3 retries: 5
start_period: 5s
volumes: volumes:
- postiz-redis-data:/data - postiz-redis-data:/data
networks: networks:
@@ -156,8 +166,10 @@ services:
# For Application Monitoring / Debugging # For Application Monitoring / Debugging
spotlight: spotlight:
profiles: [debug]
pull_policy: always pull_policy: always
container_name: spotlight container_name: spotlight
restart: unless-stopped
ports: ports:
- 8969:8969/tcp - 8969:8969/tcp
image: ghcr.io/getsentry/spotlight:latest image: ghcr.io/getsentry/spotlight:latest
@@ -170,6 +182,7 @@ services:
temporal-elasticsearch: temporal-elasticsearch:
container_name: temporal-elasticsearch container_name: temporal-elasticsearch
image: elasticsearch:7.17.27 image: elasticsearch:7.17.27
restart: always
environment: environment:
- cluster.routing.allocation.disk.threshold_enabled=true - cluster.routing.allocation.disk.threshold_enabled=true
- cluster.routing.allocation.disk.watermark.low=512mb - cluster.routing.allocation.disk.watermark.low=512mb
@@ -182,12 +195,19 @@ services:
- temporal-network - temporal-network
expose: expose:
- 9200 - 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: volumes:
- /var/lib/elasticsearch/data - temporal-elasticsearch-data:/usr/share/elasticsearch/data
temporal-postgresql: temporal-postgresql:
container_name: temporal-postgresql container_name: temporal-postgresql
image: postgres:16 image: postgres:16
restart: always
environment: environment:
POSTGRES_PASSWORD: temporal POSTGRES_PASSWORD: temporal
POSTGRES_USER: temporal POSTGRES_USER: temporal
@@ -195,17 +215,26 @@ services:
- temporal-network - temporal-network
expose: expose:
- 5432 - 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U temporal"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes: volumes:
- /var/lib/postgresql/data - temporal-postgres-data:/var/lib/postgresql/data
temporal: temporal:
container_name: temporal container_name: temporal
restart: always
ports: ports:
- '7233:7233' - '7233:7233'
image: temporalio/auto-setup:1.28.1 image: temporalio/auto-setup:1.28.1
depends_on: depends_on:
- temporal-postgresql temporal-postgresql:
- temporal-elasticsearch condition: service_healthy
temporal-elasticsearch:
condition: service_healthy
environment: environment:
- DB=postgres12 - DB=postgres12
- DB_PORT=5432 - DB_PORT=5432
@@ -219,6 +248,12 @@ services:
- TEMPORAL_NAMESPACE=default - TEMPORAL_NAMESPACE=default
networks: networks:
- temporal-network - temporal-network
healthcheck:
test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "temporal:7233"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
volumes: volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig - ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels: labels:
@@ -227,6 +262,7 @@ services:
temporal-admin-tools: temporal-admin-tools:
container_name: temporal-admin-tools container_name: temporal-admin-tools
image: temporalio/admin-tools:1.28.1-tctl-1.18.4-cli-1.4.1 image: temporalio/admin-tools:1.28.1-tctl-1.18.4-cli-1.4.1
restart: on-failure
environment: environment:
- TEMPORAL_ADDRESS=temporal:7233 - TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233 - TEMPORAL_CLI_ADDRESS=temporal:7233
@@ -234,12 +270,14 @@ services:
- temporal-network - temporal-network
stdin_open: true stdin_open: true
depends_on: depends_on:
- temporal temporal:
condition: service_healthy
tty: true tty: true
temporal-ui: temporal-ui:
container_name: temporal-ui container_name: temporal-ui
image: temporalio/ui:2.34.0 image: temporalio/ui:2.34.0
restart: always
environment: environment:
- TEMPORAL_ADDRESS=temporal:7233 - TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://127.0.0.1:3000 - TEMPORAL_CORS_ORIGINS=http://127.0.0.1:3000
@@ -247,6 +285,15 @@ services:
- temporal-network - temporal-network
ports: ports:
- '8080:8080' - '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: volumes:
postgres-volume: postgres-volume:
@@ -261,6 +308,12 @@ volumes:
postiz-uploads: postiz-uploads:
external: false external: false
temporal-postgres-data:
external: false
temporal-elasticsearch-data:
external: false
networks: networks:
postiz-network: postiz-network:
external: false external: false