Files
api-ubigeo/docker-compose.production.yml
Gianpierre Mio 76b238cba1
Some checks failed
Deploy / deploy (push) Failing after 4m44s
fix: add Traefik labels to expose api-ubigeo via reverse proxy
Container is in the easypanel network — Traefik auto-detects via labels.
Routes api-ubigeo.darkcodex.dev -> port 3200 with Let's Encrypt SSL.
2026-03-10 08:27:21 -05:00

77 lines
1.9 KiB
YAML

services:
postgres:
image: postgres:16-alpine
container_name: ubigeo-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ubigeo_user
POSTGRES_PASSWORD: UbigeoDB2026
POSTGRES_DB: ubigeo_db
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ubigeo_user -d ubigeo_db"]
interval: 10s
timeout: 5s
retries: 5
networks:
- ubigeo_network
- easypanel
redis:
image: redis:7-alpine
container_name: ubigeo-redis
restart: unless-stopped
command: >
redis-server
--maxmemory 128mb
--maxmemory-policy allkeys-lru
--appendonly yes
--appendfsync everysec
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
networks:
- ubigeo_network
api:
image: ubigeo-api:latest
container_name: ubigeo-api
restart: unless-stopped
ports:
- "127.0.0.1:3200:3200"
environment:
DATABASE_URL: "postgresql://ubigeo_user:UbigeoDB2026@postgres:5432/ubigeo_db"
REDIS_URL: "redis://ubigeo-redis:6379"
PORT: 3200
NODE_ENV: production
labels:
- "traefik.enable=true"
- "traefik.http.routers.ubigeo-api.rule=Host(`api-ubigeo.darkcodex.dev`)"
- "traefik.http.routers.ubigeo-api.entrypoints=websecure"
- "traefik.http.routers.ubigeo-api.tls.certresolver=letsencrypt"
- "traefik.http.services.ubigeo-api.loadbalancer.server.port=3200"
- "traefik.docker.network=easypanel"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- ubigeo_network
- easypanel
volumes:
postgres_data:
redis_data:
networks:
ubigeo_network:
driver: bridge
easypanel:
external: true