version: "3" services: oj-redis: image: redis:4.0-alpine restart: always volumes: - ./data/redis:/data oj-postgres: image: postgres:10-alpine restart: always volumes: - ./data/postgres:/var/lib/postgresql/data environment: - POSTGRES_DB=onlinejudge - POSTGRES_USER=onlinejudge - POSTGRES_PASSWORD=onlinejudge oj-judge: image: registry.cn-hongkong.aliyuncs.com/oj-image/judge:1.6.1 restart: always read_only: true cap_drop: - SETPCAP - MKNOD - NET_BIND_SERVICE - SYS_CHROOT - SETFCAP - FSETID tmpfs: - /tmp volumes: - ./data/backend/test_case:/test_case:ro - ./data/judge_server/log:/log - ./data/judge_server/run:/judger environment: - SERVICE_URL=http://oj-judge:8080 - BACKEND_URL=http://oj-backend:8000/api/judge_server_heartbeat/ - TOKEN=CHANGE_THIS # - judger_debug=1 oj-backend: image: registry.cn-hongkong.aliyuncs.com/oj-image/backend:1.6.1 restart: always depends_on: - oj-redis - oj-postgres - oj-judge volumes: - ./data/backend:/data environment: - POSTGRES_DB=onlinejudge - POSTGRES_USER=onlinejudge - POSTGRES_PASSWORD=onlinejudge - JUDGE_SERVER_TOKEN=CHANGE_THIS # - FORCE_HTTPS=1 # - STATIC_CDN_HOST=cdn.oj.com ports: - "0.0.0.0:80:8000" - "0.0.0.0:443:1443"