Stack uses Tailscale + Nginx Proxy Manager, not Traefik. Client exposes PORT (default 3080) for NPM to proxy to. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
# TicketingSystem — Production
|
|
# Copy this file + .env to your server, then:
|
|
# docker compose pull && docker compose up -d
|
|
# First deploy only:
|
|
# docker compose exec server npm run db:seed
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ticketing
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- internal
|
|
|
|
server:
|
|
image: ${REGISTRY}/josh/ticketing-server:${TAG:-latest}
|
|
restart: unless-stopped
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/ticketing
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
CLIENT_URL: ${CLIENT_URL}
|
|
PORT: 3000
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- internal
|
|
|
|
client:
|
|
image: ${REGISTRY}/josh/ticketing-client:${TAG:-latest}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${PORT:-3080}:80"
|
|
depends_on:
|
|
- server
|
|
networks:
|
|
- internal
|
|
|
|
networks:
|
|
internal:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|