77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
services:
|
|
caddy:
|
|
image: docker.io/library/caddy:2-alpine
|
|
container_name: kompress-caddy
|
|
env_file:
|
|
- .env.production
|
|
ports:
|
|
- "443:443"
|
|
- "443:443/udp"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
networks:
|
|
- kompress_eshop-net
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- kompress
|
|
|
|
kompress:
|
|
container_name: kompress
|
|
build:
|
|
context: .
|
|
dockerfile: Podmanfile
|
|
env_file:
|
|
- .env.production
|
|
environment:
|
|
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
|
volumes:
|
|
- kompress_eshop_data:/usr/app/data
|
|
networks:
|
|
- kompress_eshop-net
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fsS http://localhost:5150/_ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
postgres:
|
|
image: docker.io/library/postgres:16-alpine
|
|
container_name: kompress-postgres
|
|
env_file:
|
|
- .env.production
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- kompress_eshop-net
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\""]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
kompress_eshop-net:
|
|
name: kompress_eshop-net
|
|
|
|
volumes:
|
|
kompress_eshop_data:
|
|
name: kompress_eshop_data
|
|
postgres_data:
|
|
name: kompress_postgres_data
|
|
caddy_data:
|
|
name: kompress_caddy_data
|
|
caddy_config:
|
|
name: kompress_caddy_config
|