88 lines
2.0 KiB
YAML
88 lines
2.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Main website - Nginx serving static Astro build
|
|
website:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
container_name: mintel-website
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:80"
|
|
environment:
|
|
- NGINX_HOST=${DOMAIN:-localhost}
|
|
- REDIS_URL=redis://redis:6379
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# Redis cache for performance
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: mintel-redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
# Caddy reverse proxy with automatic SSL
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
container_name: mintel-caddy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./docker/Caddyfile:/etc/caddy/Caddyfile
|
|
- caddy-data:/data
|
|
- caddy-config:/config
|
|
environment:
|
|
- DOMAIN=${DOMAIN:-localhost}
|
|
- EMAIL=${ADMIN_EMAIL:-admin@example.com}
|
|
depends_on:
|
|
- website
|
|
networks:
|
|
- app-network
|
|
|
|
# Plausible Analytics (if you want to run it alongside)
|
|
# Uncomment if you need to spin up a new Plausible instance
|
|
# plausible:
|
|
# image: plausible/analytics:v2.0
|
|
# container_name: mintel-plausible
|
|
# restart: unless-stopped
|
|
# ports:
|
|
# - "8081:8000"
|
|
# environment:
|
|
# - BASE_URL=https://analytics.${DOMAIN}
|
|
# - SECRET_KEY_BASE=${PLAUSIBLE_SECRET}
|
|
# depends_on:
|
|
# - postgres
|
|
# - clickhouse
|
|
# networks:
|
|
# - app-network
|
|
|
|
volumes:
|
|
redis-data:
|
|
caddy-data:
|
|
caddy-config:
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge |