6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-15 17:47:13 +00:00

Do not build nginx image

Instead, just import the base image and customise it with volumes.
This commit is contained in:
Régis Behmo 2018-04-27 19:07:02 +02:00
parent 6bdc34e560
commit e8d916920c
7 changed files with 7 additions and 13 deletions

2
.gitignore vendored
View File

@ -2,7 +2,7 @@
config.json config.json
openedx/config/*.env.json openedx/config/*.env.json
openedx/config/*.auth.json openedx/config/*.auth.json
nginx/config/*.conf config/rendered/nginx/*.conf
mysql/config/database mysql/config/database
mysql/config/username mysql/config/username
mysql/config/password mysql/config/password

0
config/rendered/nginx/.gitignore vendored Normal file
View File

8
configure vendored
View File

@ -174,13 +174,13 @@ def main():
# We need a different delimiter in nginx config files, because the '$' sign # We need a different delimiter in nginx config files, because the '$' sign
# is widely used there # is widely used there
substitute( substitute(
os.path.join('nginx', 'config', 'templates', 'lms.conf.templ'), os.path.join('config', 'templates', 'nginx', 'lms.conf.templ'),
os.path.join('nginx', 'config', 'lms.conf'), os.path.join('config', 'rendered', 'nginx', 'lms.conf'),
delimiter='£', **configurator.as_dict() delimiter='£', **configurator.as_dict()
) )
substitute( substitute(
os.path.join('nginx', 'config', 'templates', 'cms.conf.templ'), os.path.join('config', 'templates', 'nginx', 'cms.conf.templ'),
os.path.join('nginx', 'config', 'cms.conf'), os.path.join('config', 'rendered', 'nginx', 'cms.conf'),
delimiter='£', **configurator.as_dict() delimiter='£', **configurator.as_dict()
) )

View File

@ -30,12 +30,12 @@ services:
MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/conf.d/openedx/password MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/conf.d/openedx/password
nginx: nginx:
build: image: nginx:1.13
context: ./nginx
restart: unless-stopped restart: unless-stopped
ports: ports:
- "80:80" - "80:80"
volumes: volumes:
- ./config/rendered/nginx:/etc/nginx/conf.d/
- ./data/lms:/openedx/data/lms:ro - ./data/lms:/openedx/data/lms:ro
- ./data/cms:/openedx/data/cms:ro - ./data/cms:/openedx/data/cms:ro

View File

@ -1,6 +0,0 @@
FROM nginx:1.13
VOLUME /openedx/data/lms
VOLUME /openedx/data/cms
COPY ./config/lms.conf /etc/nginx/conf.d/lms.conf
COPY ./config/cms.conf /etc/nginx/conf.d/cms.conf