Initial commit: TicketingSystem
Internal ticketing app with CTI routing, severity levels, and n8n integration. Stack: Express + TypeScript + Prisma + PostgreSQL / React + Vite + Tailwind - JWT auth for users, API key auth for service accounts (Goddard/n8n) - CTI hierarchy (Category > Type > Item) for ticket routing - Severity 1-5, auto-close resolved tickets after 14 days - Gitea Actions CI/CD building separate server/client images - Production docker-compose.yml with Traefik integration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
61
docker-compose.yml
Normal file
61
docker-compose.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
# 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: https://${DOMAIN}
|
||||
PORT: 3000
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- internal
|
||||
|
||||
client:
|
||||
image: ${REGISTRY}/josh/ticketing-client:${TAG:-latest}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- server
|
||||
networks:
|
||||
- internal
|
||||
- proxy
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.tickets.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.tickets.entrypoints=websecure"
|
||||
- "traefik.http.routers.tickets.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.tickets.loadbalancer.server.port=80"
|
||||
|
||||
networks:
|
||||
internal:
|
||||
driver: bridge
|
||||
proxy:
|
||||
external: true # Traefik's proxy network
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user