Files
HexaWetter/docker-compose.yml
TheOnlyMace 5a08d4c4ac
All checks were successful
CI / api-check (push) Successful in 20s
CI / frontend-check (push) Successful in 6s
HexaWetter v1.2.0: Security, Admin, Radar, UI
2026-06-18 23:59:08 +02:00

99 lines
2.4 KiB
YAML

services:
postgres:
image: timescale/timescaledb:latest-pg16
container_name: hexawetter-postgres
restart: unless-stopped
environment:
POSTGRES_DB: hexawetter
POSTGRES_USER: hexawetter
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hexawetter}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hexawetter -d hexawetter"]
interval: 10s
timeout: 5s
retries: 8
redis:
image: redis:7-alpine
container_name: hexawetter-redis
restart: unless-stopped
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 8
api:
build:
context: ./api
container_name: hexawetter-api
restart: unless-stopped
env_file:
- .env
environment:
DATABASE_URL: postgresql://hexawetter:${POSTGRES_PASSWORD:-hexawetter}@postgres:5432/hexawetter
REDIS_URL: redis://redis:6379/0
volumes:
- ./data:/data
ports:
- "127.0.0.1:${API_PORT:-8081}:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
image: nginx:1.27-alpine
container_name: hexawetter-frontend
restart: unless-stopped
environment:
API_KEY: ${API_KEY:-}
depends_on:
- api
volumes:
- ./frontend:/usr/share/nginx/html:ro
- ./nginx.conf.template:/etc/nginx/templates/default.conf.template:ro
ports:
- "${WEB_PORT:-8080}:80"
radar-worker:
build:
context: ./worker
container_name: hexawetter-radar-worker
restart: unless-stopped
env_file:
- .env
volumes:
- ./data:/data
command: ["python", "worker.py"]
depends_on:
- api
radar-renderer:
build:
context: ./renderer
container_name: hexawetter-radar-renderer
restart: unless-stopped
env_file:
- .env
environment:
DATABASE_URL: postgresql://hexawetter:${POSTGRES_PASSWORD:-hexawetter}@postgres:5432/hexawetter
volumes:
- ./data:/data
depends_on:
postgres:
condition: service_healthy
radar-worker:
condition: service_started
volumes:
postgres_data:
redis_data: