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

Consider switching to from letsencrypt crontab to lua-resty-open-ssl #33

Open
Valian opened this issue Dec 5, 2020 · 1 comment
Open

Comments

@Valian
Copy link

Valian commented Dec 5, 2020

There's a very neat alternative to letsencrypt CLI - https://github.com/auto-ssl/lua-resty-auto-ssl#lua-resty-auto-ssl. It's OpenResty (nginx with lua support) module generating and renewing certificates on-the-fly, as they're requested. I've created a pretty popular docker image making it very easy to use https://github.com/Valian/docker-nginx-auto-ssl

# docker-compose.yml
version: '3'
services:
  # your application, listening on port specified in `SITES` env variable
  myapp:
    image: nginx

  nginx:
    image: valian/docker-nginx-auto-ssl
    restart: on-failure
    ports:
      - 80:80
      - 443:443
    volumes:
      - ssl_data:/etc/resty-auto-ssl
    environment:
      ALLOWED_DOMAINS: 'yourdomain.com'
      SITES: 'yourdomain.com=myapp:80'
  

volumes:
  ssl_data:

No crontab, no hassle, it just works. Can be integrated directly into nginx serving media / static files.

@mlech-reef
Copy link
Contributor

Looks nice. Can it auto-handle self-signed certs for localhost? I read that Caddy can https://caddyserver.com/docs/automatic-https

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants