- Node.js Express application with modern white UI - PostgreSQL and Redis integration - Docker Compose configuration without host port mappings - Traefik-ready with proper labels - Health check endpoint 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
container_name: template-001-app
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
- POSTGRES_HOST=postgres
|
|
- POSTGRES_PORT=5432
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=template_db
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
networks:
|
|
- app-network
|
|
expose:
|
|
- "3000"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.template-001.rule=Host(`template-001.startanaicompany.com`)"
|
|
- "traefik.http.routers.template-001.entrypoints=websecure"
|
|
- "traefik.http.routers.template-001.tls=true"
|
|
- "traefik.http.routers.template-001.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.template-001.loadbalancer.server.port=3000"
|
|
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: template-001-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=template_db
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- app-network
|
|
expose:
|
|
- "5432"
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: template-001-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- app-network
|
|
expose:
|
|
- "6379"
|
|
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|
|
redis-data:
|
|
driver: local
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|