diff --git a/Dockerfile b/Dockerfile index 061bd4e..be08132 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG OSM_COMMIT=a5f72216395fb490a984dd86575f855c94a6a02f +ARG OSM_COMMIT=312648cb05d891d62aa670b96e7ffc812265fe90 FROM docker.io/ruby:3.3.0-slim-bookworm as openstreetmap-repo @@ -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}" diff --git a/nginx/container-entrypoint.sh b/nginx/container-entrypoint.sh index 5e58dee..088573f 100644 --- a/nginx/container-entrypoint.sh +++ b/nginx/container-entrypoint.sh @@ -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)