Files
mirror/docker-compose.yml
T
mohammadian7 384680cd82 Fix Docker build without VPN proxy dependency
Make build proxy optional and use Arvan mirrors for apt/pip by default. Fixes 503 errors when xray proxy on 172.17.0.1:1081 is unavailable during Dokploy deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 20:26:09 +03:30

43 lines
1.5 KiB
YAML

services:
mirror-manager:
build:
context: .
dockerfile: Dockerfile
args:
BASE_IMAGE: docker.arvancloud.ir/library/python:3.12-slim-bookworm
PYPI_INDEX: https://mirror.arvancloud.ir/pypi/simple
# اختیاری — فقط اگر xray روی host فعال است:
BUILD_HTTP_PROXY: ${BUILD_HTTP_PROXY:-}
BUILD_HTTPS_PROXY: ${BUILD_HTTPS_PROXY:-}
container_name: mirror-manager
restart: unless-stopped
privileged: true
pid: host
environment:
- SECRET_KEY=${SECRET_KEY:-change-me-in-production}
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-change-me}
- HOST_ROOT=/host
- DATA_DIR=/app/data
- ROLLBACK_MINUTES=${ROLLBACK_MINUTES:-15}
- TEST_ROLLBACK_MINUTES=${TEST_ROLLBACK_MINUTES:-2}
- AUTO_TEST_INTERVAL_MINUTES=${AUTO_TEST_INTERVAL_MINUTES:-30}
volumes:
- /etc:/host/etc
- /var/lib/mirror-manager/data:/app/data
- /usr/bin/docker:/usr/bin/docker:ro
- /var/run/docker.sock:/var/run/docker.sock
networks:
- dokploy-network
labels:
- traefik.enable=true
- traefik.docker.network=dokploy-network
- traefik.http.routers.mirror-itistan.rule=Host(`mirror.itistan.ir`)
- traefik.http.routers.mirror-itistan.entrypoints=websecure
- traefik.http.routers.mirror-itistan.tls.certResolver=letsencrypt
- traefik.http.services.mirror-itistan.loadbalancer.server.port=8765
networks:
dokploy-network:
external: true