77 lines
2 KiB
YAML
77 lines
2 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
# --- PostgreSQL ---
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: chu_iptv
|
|
POSTGRES_USER: chu_iptv
|
|
POSTGRES_PASSWORD: ChuIptv2026Secure!
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
container_name: chu-iptv-db
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U chu_iptv"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
# --- API Centrale ---
|
|
api:
|
|
build:
|
|
context: ../../services/api
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "4100:4000"
|
|
environment:
|
|
PORT: "4000"
|
|
DATABASE_URL: "postgresql://chu_iptv:ChuIptv2026Secure!@db:5432/chu_iptv?schema=public"
|
|
JWT_SECRET: "chu_iptv_prod_secret_2026_cosmolan"
|
|
MOBILE_URL: "https://chu-iptv-mobile.cosmolan.fr"
|
|
TV_URL: "https://chu-iptv.cosmolan.fr"
|
|
ADMIN_URL: "https://chu-iptv-admin.cosmolan.fr"
|
|
VAPID_PUBLIC_KEY: "BCuFCs7IxOeWHeET--lJzwQx6CLoEwGRxK5kxGN1H6n3ycGCl770QyvxFJCsa8449aCjJU6GfoZJtsV8fKdEaiQ"
|
|
VAPID_PRIVATE_KEY: "3Rf8X6V_xBtlHsFZIJB90vDJaHtuYdsAm_qEEWO3cgo"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
container_name: chu-iptv-api
|
|
|
|
# --- Simulateur TV ---
|
|
tv:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "3100:80"
|
|
volumes:
|
|
- ../../apps/tv-simulator:/usr/share/nginx/html:ro
|
|
- ../nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
restart: unless-stopped
|
|
container_name: chu-iptv-tv
|
|
|
|
# --- PWA Mobile ---
|
|
mobile:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "3101:80"
|
|
volumes:
|
|
- ../../apps/mobile-web:/usr/share/nginx/html:ro
|
|
- ../nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
restart: unless-stopped
|
|
container_name: chu-iptv-mobile
|
|
|
|
# --- Admin Web ---
|
|
admin:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "3102:80"
|
|
volumes:
|
|
- ../../apps/admin-web:/usr/share/nginx/html:ro
|
|
- ../nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
restart: unless-stopped
|
|
container_name: chu-iptv-admin
|
|
|
|
volumes:
|
|
pgdata:
|