Files
kompress_eshop/docker-compose.prod.yml
Priec 9d2368ee08
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled
podman -> docker
2026-06-30 00:49:25 +02:00

59 lines
1.6 KiB
YAML

services:
kompress:
container_name: kompress
build:
context: .
dockerfile: Dockerfile
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: 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
# External network shared with the central Caddy (docker-compose.caddy.yml).
# Create it once on the host: docker network create kompress_eshop-net
# Then add it to the caddy service's `networks:` list so Caddy can reach
# `kompress:5150` by container name — exactly like gitea-net etc.
networks:
kompress_eshop-net:
external: true
volumes:
kompress_eshop_data:
name: kompress_eshop_data
postgres_data:
name: kompress_postgres_data