version: "3.8" services: redis: image: redis:7.4.2-alpine restart: always volumes: - redis_data:/data healthcheck: test: ["CMD","redis-cli","ping"] interval: 10s timeout: 5s retries: 5 web: build: # build context is the repository root (one level up from this file) context: .. dockerfile: rad/Dockerfile.prod restart: always env_file: - ../.env.prod environment: - DJANGO_SETTINGS_MODULE=rad.settings.production depends_on: redis: condition: service_healthy volumes: - static_volume:/usr/src/app/static - media_volume:/usr/src/app/media # Mount the server-specific local settings if present (DO NOT commit secrets). # On the server create: rad/deploy/settings_local.py and it will be mounted into the container. - ../deploy/settings_local.py:/usr/src/app/rad/settings_local.py:ro expose: - "8000" command: ["/usr/src/app/entrypoint.sh"] nginx: image: nginx:stable-alpine restart: always ports: - "80:80" - "443:443" depends_on: - web volumes: - ../deploy/nginx/prod.conf:/etc/nginx/conf.d/default.conf:ro - static_volume:/usr/src/app/static:ro - media_volume:/usr/src/app/media:ro - ../deploy/nginx/certs:/etc/letsencrypt:ro # Host-provided front-end bundles and static folders. Populate these under rad/deploy on the server - ../deploy/www/viewer:/srv/www/viewer:ro - ../deploy/www/ohif:/srv/www/ohif:ro - ../deploy/www/rts:/srv/www/rts:ro - ../deploy/nicereporter:/srv/nicereporter:rw - ../deploy/proc-rota:/srv/proc/rota:ro - ../deploy/uploader:/srv/uploader:ro healthcheck: test: ["CMD-SHELL","nginx -t" ] interval: 30s timeout: 10s retries: 3 volumes: postgres_data: redis_data: static_volume: media_volume: networks: default: driver: bridge