7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-05-29 12:20:49 +00:00

Re-add dependency of nginx to lms/cms

We re-introduce the dependency of the nginx container on the lms/cms
images. This dependency was removed to address a debugging scenario
which is actually not practical. Without this dependency, we are forced
to use an external docker-specific resolver which makes the local nginx
configuration incompatible with the kubernetes configuration.
This commit is contained in:
Régis Behmo 2019-01-06 21:27:17 +01:00
parent 7105183172
commit d0f02b7268
4 changed files with 19 additions and 12 deletions

View File

@ -47,6 +47,10 @@ services:
- ../env/nginx:/etc/nginx/conf.d/
- ../../data/openedx:/var/www/openedx:ro
- ../../data/letsencrypt:/etc/letsencrypt/:ro
depends_on:
- lms
- cms
{% if ACTIVATE_NOTES %}- notes{% endif %}
rabbitmq:
image: rabbitmq:3.6.10

View File

@ -1,3 +1,7 @@
upstream cms-backend {
server cms:8000 fail_timeout=0;
}
{% if ACTIVATE_HTTPS %}
server {
server_name {{ CMS_HOST }};
@ -31,10 +35,7 @@ server {
proxy_set_header Host $http_host;
proxy_redirect off;
# Docker resolver
resolver 127.0.0.11 valid=10s;
set $upstream cms;
proxy_pass http://$upstream:8000;
proxy_pass http://cms-backend;
}
location / {

View File

@ -1,4 +1,8 @@
{% if ACTIVATE_NOTES %}
upstream notes-backend {
server notes:8000 fail_timeout=0;
}
{% if ACTIVATE_HTTPS %}
server {
server_name notes.{{ LMS_HOST }};
@ -26,10 +30,7 @@ server {
proxy_set_header Host $http_host;
proxy_redirect off;
# Docker resolver
resolver 127.0.0.11 valid=10s;
set $upstream notes;
proxy_pass http://$upstream:8000;
proxy_pass http://notes-backend:8000;
}
}
{% endif %}

View File

@ -1,3 +1,7 @@
upstream lms-backend {
server lms:8000 fail_timeout=0;
}
{% if ACTIVATE_HTTPS %}
server {
server_name {{ LMS_HOST }} preview.{{ LMS_HOST }};
@ -31,10 +35,7 @@ server {
proxy_set_header Host $http_host;
proxy_redirect off;
# Docker resolver
resolver 127.0.0.11 valid=10s;
set $upstream lms;
proxy_pass http://$upstream:8000;
proxy_pass http://lms-backend;
}
location / {