Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build arguments for CKAN and PyCSW locations for nginx service #162

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ services:
build:
context: nginx/
dockerfile: Dockerfile
args:
PROXY_CKAN_LOCATION: ${PROXY_CKAN_LOCATION}
PROXY_PYCSW_LOCATION: ${PROXY_PYCSW_LOCATION}
env_file:
- .env
environment:
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ services:
build:
context: nginx/
dockerfile: Dockerfile
args:
PROXY_CKAN_LOCATION: ${PROXY_CKAN_LOCATION}
PROXY_PYCSW_LOCATION: ${PROXY_PYCSW_LOCATION}
env_file:
- .env
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
max-size: "100m"
max-file: "10"
networks:
- webnet
- ckannet
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ services:
build:
context: nginx/
dockerfile: Dockerfile
args:
PROXY_CKAN_LOCATION: ${PROXY_CKAN_LOCATION}
PROXY_PYCSW_LOCATION: ${PROXY_PYCSW_LOCATION}
env_file:
- .env
logging:
Expand Down
7 changes: 4 additions & 3 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM nginx:stable-alpine

ARG PROXY_CKAN_LOCATION=/catalog
ARG PROXY_PYCSW_LOCATION=/csw

ENV CKAN_PORT=5000
ENV PYCSW_PORT=8000
ENV PYCSW_COMPOSE_SERVICE=pycsw
ENV CKAN_COMPOSE_SERVICE=ckan
ENV PROXY_SERVER_NAME=localhost
ENV PROXY_CKAN_LOCATION=/catalog
ENV PROXY_PYCSW_LOCATION=/csw
ENV PROXY_PYCSW_PROXY_PASS=http://${PYCSW_COMPOSE_SERVICE}:${PYCSW_PORT}
ENV PROXY_CKAN_PROXY_PASS=http://${CKAN_COMPOSE_SERVICE}:${CKAN_PORT}

Expand All @@ -25,6 +26,6 @@ COPY setup/ckan-local.* ${NGINX_DIR}/certs/
COPY setup/html/index.html setup/html/robots.txt ${NGINX_SHARE_HTML_DIR}/

# Replace $PROXY_CKAN_LOCATION and $PROXY_PYCSW_LOCATION in index.html
RUN sed -i "s|/catalog|${PROXY_CKAN_LOCATION}|g; s|/csw|${PROXY_PYCSW_LOCATION}|g" ${NGINX_SHARE_HTML_DIR}/index.html
RUN sed -i "s|<a href=\"/catalog\">|<a href=\"${PROXY_CKAN_LOCATION}\">|g; s|<a href=\"/csw\">|<a href=\"${PROXY_PYCSW_LOCATION}\">|g" ${NGINX_SHARE_HTML_DIR}/index.html

EXPOSE ${NGINX_PORT}
1 change: 0 additions & 1 deletion nginx/setup/html/github.svg

This file was deleted.

Loading