Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
fix: nginx cert init entrypoint, osm dockerfile git clone
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Apr 28, 2024
1 parent 39205ab commit 7e619de
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG OSM_COMMIT=a5f72216395fb490a984dd86575f855c94a6a02f
ARG OSM_COMMIT=312648cb05d891d62aa670b96e7ffc812265fe90


FROM docker.io/ruby:3.3.0-slim-bookworm as openstreetmap-repo
Expand All @@ -12,7 +12,7 @@ RUN set -ex \
WORKDIR /repo
RUN update-ca-certificates
ARG OSM_COMMIT
RUN git clone --depth 1 --no-checkout \
RUN git clone --branch master --shallow-since=2024-04-27 \
https://github.com/openstreetmap/openstreetmap-website.git \
&& cd openstreetmap-website && git checkout "${OSM_COMMIT}"

Expand Down
12 changes: 10 additions & 2 deletions nginx/container-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ if [ -z "${DOMAIN}" ]; then
exit 1
fi

# Renew certs arg (default api & frontend only)
certbot_args=(
"--non-interactive" "certonly" \
"--webroot" "--webroot-path=/var/www/certbot" \
"--email" "${CERT_EMAIL}" "--agree-tos" "--no-eff-email" \
"-d" "${DOMAIN}" \
)

# Run certbot with the constructed arguments
echo "Running command: certbot --non-interactive certonly ${certbot_args[*]}"
certbot --non-interactive certonly "${certbot_args[@]}"
echo "Running command: certbot ${certbot_args}"
certbot "${certbot_args}"
echo "Certificate generated under: /etc/letsencrypt/live/${DOMAIN}/"

# Successful exit (stop container)
Expand Down

0 comments on commit 7e619de

Please sign in to comment.