Skip to content

Commit

Permalink
Update NGINX configuration and add CKAN server name
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed Mar 28, 2024
1 parent a24fc16 commit 8416fdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.dbca
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ CKANEXT__XLOADER__JOBS_DB__URI=$CKAN_SQLALCHEMY_URL
# NGINX
NGINX_PORT=80
NGINX_SSLPORT=443
CKAN_SERVER_NAME=localhost

# Extensions

Expand Down
3 changes: 2 additions & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apk update --no-cache && \
COPY setup/nginx.conf ${NGINX_DIR}/nginx.conf
COPY setup/index.html /usr/share/nginx/html/index.html
COPY setup/default.conf ${NGINX_DIR}/conf.d/
COPY setup/default.conf.template ${NGINX_DIR}/templates/
COPY setup/default.conf.template ${NGINX_DIR}/

RUN mkdir -p ${NGINX_DIR}/certs

Expand All @@ -29,4 +29,5 @@ ENTRYPOINT \
-out ${NGINX_DIR}/certs/ckan-local.crt \
-days 365 && \
/usr/sbin/crond && \
mkdir -p ${NGINX_DIR}/templates && mv ${NGINX_DIR}/default.conf.template ${NGINX_DIR}/templates/default.conf.template && \
/docker-entrypoint.sh nginx -g 'daemon off;'
2 changes: 1 addition & 1 deletion nginx/setup/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {
#listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
server_name localhost;
server_name ${CKAN_SERVER_NAME};
ssl_certificate /etc/nginx/certs/ckan-local.crt;
ssl_certificate_key /etc/nginx/certs/ckan-local.key;

Expand Down

0 comments on commit 8416fdc

Please sign in to comment.