tutor/tutor/templates/local/docker-compose.prod.yml

30 lines
1.1 KiB
YAML

version: "3.7"
services:
openedx-assets:
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
volumes:
- ../../data/openedx:/var/www/openedx
command: sh -c "rm -rf /var/www/openedx/staticfiles && cp -r /openedx/staticfiles/ /var/www/openedx/"
nginx:
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_NGINX }}
restart: unless-stopped
ports:
- "{{ NGINX_HTTP_PORT }}:80"
- "{{ NGINX_HTTPS_PORT }}:443"
{% if not WEB_PROXY %}
networks:
default:
aliases:
- "{{ LMS_HOST }}"
{{ patch("local-docker-compose-nginx-aliases")|indent(10) }}
{% endif %}
volumes:
- ../apps/nginx:/etc/nginx/conf.d/:ro
- ../../data/openedx:/var/www/openedx:ro
- ../../data/openedx-media:/var/www/openedx-media:ro
{% if ACTIVATE_HTTPS %}- ../../data/letsencrypt:/etc/letsencrypt/:ro{% endif %}
{{ patch("local-docker-compose-nginx-volumes")|indent(6) }}
depends_on: {{ [("lms", ACTIVATE_LMS), ("cms", ACTIVATE_CMS)]|list_if }}
{{ patch("local-docker-compose-prod-services")|indent(2) }}