ok this seems to work

This commit is contained in:
counterweight 2025-02-14 20:03:28 +01:00
parent e725dce831
commit 15ffabebf3
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
6 changed files with 54 additions and 46 deletions

View file

@ -1,45 +1,14 @@
version: '3'
services:
express:
app:
build: .
user: "${UID:-1000}:${GID:-1000}"
ports:
- "3000:3000"
volumes:
- ./container-data:/app/data
networks:
- app_network
depends_on:
postgres:
condition: service_healthy
caddy:
image: caddy:2
ports:
- "80:80"
volumes:
- ./caddy:/etc/caddy
networks:
- app_network
depends_on:
- express
postgres:
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "3000:3000"
- "5432:5432"
networks:
- app_network
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}" ]
interval: 1s
retries: 10
networks:
app_network:
driver: bridge
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}