Add all files to repository
This commit is contained in:
+160
@@ -0,0 +1,160 @@
|
||||
services:
|
||||
|
||||
proxy:
|
||||
image: traefik:v2.11
|
||||
container_name: tv-proxy-prod
|
||||
restart: unless-stopped
|
||||
|
||||
command:
|
||||
- --providers.docker=true
|
||||
- --providers.docker.exposedbydefault=false
|
||||
- --entrypoints.web.address=:3000
|
||||
- --api.insecure=true
|
||||
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
redis:
|
||||
image: redis:8.4.0-alpine
|
||||
container_name: tv-redis-prod
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- "${REDIS_PORT}:6379"
|
||||
|
||||
volumes:
|
||||
- tv-redis-prod:/data
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: tv-db-prod
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- "${MYSQL_PORT}:3306"
|
||||
|
||||
environment:
|
||||
MYSQL_DATABASE: ${DATABASE_NAME}
|
||||
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
|
||||
|
||||
volumes:
|
||||
- tv-data-prod:/var/lib/mysql
|
||||
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
|
||||
backend:
|
||||
image: ${BACKEND_IMAGE}
|
||||
|
||||
container_name: tv-backend-prod
|
||||
restart: unless-stopped
|
||||
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.backend.rule=PathPrefix(`/api`) || PathPrefix(`/static`) || PathPrefix(`/admin`) || PathPrefix(`/ws`)"
|
||||
- "traefik.http.routers.backend.entrypoints=web"
|
||||
- "traefik.http.services.backend.loadbalancer.server.port=8000"
|
||||
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
- "com.centurylinklabs.watchtower.lifecycle.post-update=/app/scripts/post-update.sh"
|
||||
|
||||
frontend:
|
||||
image: ${FRONTEND_IMAGE}
|
||||
|
||||
container_name: tv-frontend-prod
|
||||
restart: unless-stopped
|
||||
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=False
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
|
||||
- "traefik.http.routers.frontend.entrypoints=web"
|
||||
- "traefik.http.services.frontend.loadbalancer.server.port=80"
|
||||
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
- "com.centurylinklabs.watchtower.lifecycle.post-update=/app/scripts/post-update.sh"
|
||||
|
||||
watchtower:
|
||||
image: containrrr/watchtower:1.7.1
|
||||
container_name: tv-watchtower-prod
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /root/.docker/config.json:/config.json:ro
|
||||
|
||||
command:
|
||||
- --http-api-update
|
||||
- --cleanup
|
||||
- --no-startup-message
|
||||
|
||||
environment:
|
||||
- WATCHTOWER_HTTP_API_TOKEN=${WATCHTOWER_HTTP_API_TOKEN}
|
||||
- WATCHTOWER_LIFECYCLE_HOOKS=true
|
||||
|
||||
ports:
|
||||
- "8080:8080"
|
||||
|
||||
networks:
|
||||
- tv-network-prod
|
||||
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
|
||||
volumes:
|
||||
tv-data-prod:
|
||||
name: tv-data-prod
|
||||
|
||||
tv-redis-prod:
|
||||
name: tv-redis-prod
|
||||
|
||||
networks:
|
||||
tv-network-prod:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user