rmfakecloud icon indicating copy to clipboard operation
rmfakecloud copied to clipboard

Howto: https with docker-compose + nginx-proxy

Open mooomooo opened this issue 4 years ago • 3 comments

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?

mooomooo avatar Jul 29 '21 23:07 mooomooo

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

grimreaperling avatar Aug 04 '21 02:08 grimreaperling

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.

mooomooo avatar Aug 05 '21 22:08 mooomooo

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

ddvk avatar Sep 19 '21 15:09 ddvk