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
openedx/config/*.env.json
openedx/config/*.auth.json
nginx/config/*.conf
config/rendered/nginx/*.conf
mysql/config/database
mysql/config/username
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
# is widely used there
substitute(
os.path.join('nginx', 'config', 'templates', 'lms.conf.templ'),
os.path.join('nginx', 'config', 'lms.conf'),
os.path.join('config', 'templates', 'nginx', 'lms.conf.templ'),
os.path.join('config', 'rendered', 'nginx', 'lms.conf'),
delimiter='£', **configurator.as_dict()
)
substitute(
os.path.join('nginx', 'config', 'templates', 'cms.conf.templ'),
os.path.join('nginx', 'config', 'cms.conf'),
os.path.join('config', 'templates', 'nginx', 'cms.conf.templ'),
os.path.join('config', 'rendered', 'nginx', 'cms.conf'),
delimiter='£', **configurator.as_dict()
)

View File

@ -30,12 +30,12 @@ services:
MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/conf.d/openedx/password
nginx:
build:
context: ./nginx
image: nginx:1.13
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./config/rendered/nginx:/etc/nginx/conf.d/
- ./data/lms:/openedx/data/lms: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