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

Howto: https with docker-compose + nginx-proxy #69

Open
mooomooo opened this issue Jul 29, 2021 · 3 comments
Open

Howto: https with docker-compose + nginx-proxy #69

mooomooo opened this issue Jul 29, 2021 · 3 comments

Comments

@mooomooo
Copy link

mooomooo commented Jul 29, 2021

Docker-compose and nginx-proxy makes running an https protected server super painless. Perhaps this information can be added to a README or HOWTO somewhere? (c.f. #38, #65)

Once nginx-proxy and acme-companion are set up (see https://github.com/nginx-proxy/acme-companion), define a service in docker-compose.yml as follows:

services:
  rmfakecloud:
    image: ddvk/rmfakecloud
    environment:
        - DATADIR=/data
        - STORAGE_URL=https://rmfakecloud.${DOMAIN}
        - VIRTUAL_HOST=rmfakecloud.${DOMAIN},*.appspot.com,*.remarkable.com
        - LETSENCRYPT_HOST=rmfakecloud.${DOMAIN}
        - LETSENCRYPT_EMAIL=webmaster@${DOMAIN}
        - CERT_NAME=rmfakecloud.${DOMAIN}
    volumes:
        - /data
    networks:
        - proxy

This assumes you've defined DOMAIN in your .env and set up your hosting DNS for rmfakecloud appropriately; those values can be changed to taste. All the standard docker-compose modifications (local or named volumes, restart policy, etc.) apply.

As an aside, would it be possible to tag the images on dockerhub with the release version number in addition to just latest?

@grimreaperling
Copy link

Can I ask how to create a docker network "proxy"?I just fail to create the docker container use the same way.

@mooomooo
Copy link
Author

mooomooo commented Aug 5, 2021

The named network is not strictly necessary -- this service just needs to be on the same network as your reverse proxy. The latest instructions at https://github.com/nginx-proxy/acme-companion don't ask for that, but other howtos (e.g. https://cloud.google.com/community/tutorials/nginx-reverse-proxy-docker) explain it in more detail.

@ddvk
Copy link
Owner

ddvk commented Sep 19, 2021

you no longer need nginx for tls, the variables can be set directly (TLS_CERT and TLS_KEY) . have to check if the container has been updated

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

3 participants