Skip to content

Does it make sense to add support for Let's Encrypt? #6

@nickatnight

Description

@nickatnight

Something like this in docker-entrypoint.sh

  if [[ "${LETSENCRYPT}" == "true" ]]; then
    echo "Installing Certbot"
    apk add --no-cache certbot \
    && certbot certonly --standalone --agree-tos -m "${CERTBOT_EMAIL}" -n -d ${DOMAIN_LIST} \
    && echo "certbot renew --dry-run --nginx >> /var/log/cron.log 2>&1" >/etc/periodic/daily/certbot-renew
    
    # run crond in the background with a log level of 8
    crond -b -l 8

  fi

Then

  {%- if LETSENCRYPT == 'true' and NGINX_SERVER_NAME %}
  server_name {{ NGINX_SERVER_NAME }};
  listen      0.0.0.0:{{ env('NGINX_HTTPS_PORT', '443') }} ssl;
  ssl_certificate /etc/letsencrypt/live/{{ NGINX_SERVER_NAME }}/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/{{ NGINX_SERVER_NAME }}/privkey.pem;
  {%- endif %}

In site.conf?? Something to consider

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions