This is a fork of a fork, that enables usage on a arm32v6 architecture RPI 1 (I think?). Have a look at Jason Wilder's original repository and README. The following part does not include all available options of the original project.
The original fork did not work for my raspberry pi 1 with arm32v6 so I modified it a bit, changing to alpine as a base as the arm32v6 only releases on alpine.
It worked for me so I thought I share it if it is useful for some of you.
All credit goes to Jason Wilder for the original and Alexander Krause for making it work on armhf.
Reasons and examples for using a reverse proxy are discussed by Jason Wilder or here.
- Clone this repository
$ git clone https://github.com/Kahevajo/rpi-docker-nginx-proxy.git
$ cd rpi-docker-nginx-proxy
$ docker build -t kahevajo/rpi1-nginx-proxy:latest .
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro kahevajo/rpi1-nginx-proxy:latest
Then start any containers you want proxied with an env var VIRTUAL_HOST=subdomain.youdomain.com
$ docker run -e VIRTUAL_HOST=foo.bar.com ...
rpi-docker-letsencrypt-nginx-proxy-companion is a lightweight companion container for the nginx-proxy. It allow the creation/renewal of Let's Encrypt certificates automatically.
SSL is supported using single host, wildcard and SNI certificates using naming conventions for certificates or optionally specifying a cert name (for SNI) as an environment variable.
To enable SSL:
$ docker run -d -p 80:80 -p 443:443 -v /path/to/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
The contents of /path/to/certs
should contain the certificates and private keys for any virtual
hosts in use. The certificate and keys should be named after the virtual host with a .crt
and
.key
extension. For example, a container with VIRTUAL_HOST=foo.bar.com
should have a
foo.bar.com.crt
and foo.bar.com.key
file in the certs directory.
You can use for example https://www.duckdns.org to expose your Nextcloud container or something else. See here for more details.