prod setup
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
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:
|
||||
@@ -6,11 +24,16 @@ services:
|
||||
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
|
||||
@@ -18,11 +41,36 @@ services:
|
||||
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:
|
||||
external: true
|
||||
name: kompress_eshop-net
|
||||
|
||||
volumes:
|
||||
kompress_eshop_data:
|
||||
external: true
|
||||
name: kompress_eshop_data
|
||||
postgres_data:
|
||||
name: kompress_postgres_data
|
||||
caddy_data:
|
||||
name: kompress_caddy_data
|
||||
caddy_config:
|
||||
name: kompress_caddy_config
|
||||
|
||||
Reference in New Issue
Block a user