72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
services:
|
|
backend:
|
|
image: backend
|
|
build:
|
|
context: .
|
|
dockerfile: ./Dockerfile.backend
|
|
environment:
|
|
- "Database:Url=Host=pgbouncer;Database=postgres;Username=postgres;Password=postgres"
|
|
- "Database:EnablePooling=false"
|
|
- "Host=0.0.0.0"
|
|
- "Port=5000"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/config.ini:/app/config.ini
|
|
|
|
frontend:
|
|
image: frontend
|
|
build: ./Foxnouns.Frontend
|
|
environment:
|
|
- "API_BASE=http://rate:5003/api"
|
|
- "INTERNAL_API_BASE=http://backend:5000/api"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/frontend.env:/app/.env
|
|
|
|
rate:
|
|
image: rate
|
|
build: ./rate
|
|
environment:
|
|
- "PORT=5003"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./docker/proxy-config.json:/app/proxy-config.json
|
|
|
|
pgbouncer:
|
|
image: docker.io/edoburu/pgbouncer:latest
|
|
environment:
|
|
- "DATABASE_URL=postgres://postgres:postgres@postgres/postgres"
|
|
- "AUTH_TYPE=scram-sha-256"
|
|
- "MAX_CLIENT_CONN=100"
|
|
- "DEFAULT_POOL_SIZE=100"
|
|
- "MIN_POOL_SIZE=10"
|
|
restart: unless-stopped
|
|
|
|
postgres:
|
|
image: docker.io/postgres:16
|
|
command: [ "postgres",
|
|
"-c", "max-connections=1000",
|
|
"-c", "timezone=Etc/UTC",
|
|
"-c", "max_wal_size=1GB",
|
|
"-c", "min_wal_size=80MB",
|
|
"-c", "shared_buffers=128MB" ]
|
|
environment:
|
|
- "POSTGRES_PASSWORD=postgres"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
caddy:
|
|
image: docker.io/caddy:2
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5004:80"
|
|
volumes:
|
|
- ./docker/Caddyfile:/etc/caddy/Caddyfile
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|
|
postgres_data:
|