43 lines
842 B
YAML
43 lines
842 B
YAML
version: '3'
|
|
|
|
services:
|
|
express:
|
|
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
|
|
depends_on:
|
|
- express
|
|
|
|
postgres:
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- app_network
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}" ] # Check if PostgreSQL is ready
|
|
interval: 5s
|
|
retries: 3
|
|
|
|
networks:
|
|
app_network:
|
|
driver: bridge
|