use volumes to mount nginx configuration

This commit is contained in:
Karol Wypchlo 2022-04-21 15:26:12 +02:00
parent 98306b473c
commit 306442eef3
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
3 changed files with 5 additions and 7 deletions

View File

@ -71,6 +71,10 @@ services:
- ./docker/data/nginx/skynet:/data/nginx/skynet:ro - ./docker/data/nginx/skynet:/data/nginx/skynet:ro
- ./docker/data/sia/apipassword:/data/sia/apipassword:ro - ./docker/data/sia/apipassword:/data/sia/apipassword:ro
- ./docker/data/certbot:/etc/letsencrypt - ./docker/data/certbot:/etc/letsencrypt
- ./docker/nginx/libs:/etc/nginx/libs
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- ./docker/nginx/conf.d.templates:/etc/nginx/templates
- ./docker/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
networks: networks:
shared: shared:
ipv4_address: 10.10.10.30 ipv4_address: 10.10.10.30

View File

@ -14,12 +14,6 @@ ENV NGINX_ENTRYPOINT_RELOAD_EVERY_X_HOURS 6
COPY docker/nginx/docker-entrypoint.sh / COPY docker/nginx/docker-entrypoint.sh /
COPY docker/nginx/docker-entrypoint.d /docker-entrypoint.d COPY docker/nginx/docker-entrypoint.d /docker-entrypoint.d
# copy nginx configuration files and libraries
COPY docker/nginx/libs /etc/nginx/libs
COPY docker/nginx/conf.d /etc/nginx/conf.d
COPY docker/nginx/conf.d.templates /etc/nginx/templates
COPY docker/nginx/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]
STOPSIGNAL SIGQUIT STOPSIGNAL SIGQUIT

View File

@ -7,7 +7,7 @@ set -e
ME=$(basename $0) ME=$(basename $0)
generate_local_certificate() { generate_local_certificate() {
echo >&3 "$ME: Generating locally signed ssl certificate" echo >&3 "$ME: Generating locally signed ssl certificate"
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \
-subj '/CN=local-certificate' \ -subj '/CN=local-certificate' \