https://github.com/linuxserver/fanart-nginx
https://github.com/linuxserver/fanart-nginx
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/linuxserver/fanart-nginx
- Owner: linuxserver
- Created: 2017-06-20T11:45:57.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-26T09:50:56.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T21:06:27.255Z (over 1 year ago)
- Language: Nginx
- Size: 45.9 KB
- Stars: 0
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
[ircurl]: https://www.linuxserver.io/irc/
[podcasturl]: https://www.linuxserver.io/podcast/
[appurl]: https://fanart.tv
[letsurl]: https://github.com/linuxserver/docker-letsencrypt
[hub]: https://hub.docker.com/r/lsiodev/fanart-nginx/
[][linuxserverurl]
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
* [forum.linuxserver.io][forumurl]
* [IRC][ircurl] on freenode at `#linuxserver.io`
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# lsiodev/fanart-nginx
[](https://microbadger.com/images/lsiodev/fanart-nginx "Get your own version badge on microbadger.com")[](https://microbadger.com/images/lsiodev/fanart-nginx "Get your own image badge on microbadger.com")[][hub][][hub][](https://ci.linuxserver.io/job/Docker-Builders/job/lsiodev/job/fanart-nginx/)
This docker image, forked from our [letsencrypt image][letsurl], was developed by the [LinuxServer.io][linuxserverurl] team specfically for use by [fanart.tv][appurl] and is not recommended for use by the general public.
## Usage
### Validator server
```
docker create \
--privileged \
--name=fanartstatic \
-v :/config \
-e PGID= -e PUID= \
-e EMAIL= \
-e URL= \
-p 80:80 -p 443:443 \
-e TZ= \
-e VALIDATOR= \
-e SLAVEIPS= \
lsiodev/fanart-nginx
```
### Slave Server
```
docker create \
--privileged \
--name=fanartstatic \
-v :/config \
-e PGID= -e PUID= \
-e URL= \
-p 80:80 -p 443:443 \
-e TZ= \
-e VALIDATOR= \
-e VALIDATORIP= \
lsiodev/fanart-nginx
```
## Parameters
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
* `-p 80 -p 443` - the port(s)
* `-v /config` - all the config files including the webroot reside here
* `-e URL` - the url for server
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
* `-e TZ` - timezone ie. `America/New_York`
* `-e VALIDATOR` - determines whether the server should run letsencrypt
* `-e VALIDATORIP` - mandatory for slave servers
* `-e SLAVEIPS` - IPs for cert distribution, comma separated, no spaces. Required for cert distribution to slaves. Leave out in a single server scenario.
_Optional settings:_
* `-e EMAIL` - your e-mail address for cert registration and notifications
* `-e DHLEVEL` - dhparams bit value (default=2048, can be set to `1024` or `4096`)
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it letsencrypt /bin/bash`.
## Multiple server setup instructions
### Adding a new slave
* Create the slave container and start it.
* The container will stop after generating the DH parameter due to not existing cert.
* Add the public ssh key to new slave's `authorized_keys`
* On the validator, create a new folder for the slave info and copy the sample.conf `cp -R /config-folder-path/distribute/XX.XX.XX.XX /config-folder-path/distribute/`
* Edit the sample.conf with the new slave details
* Copy the private ssh key into the folder with the name `private` (no password)
* Recreate the validator container with the new slave's IP address added into the `SLAVEIPS` variable
* Restart the new slave
* Add the new slave to the round robin dns
### Removing a slave
* Remove the slave from the round robin DNS
* Remove the slave container
* Recreate the validator with the slave's IP removed from the `SLAVEIPS` variable
### Switching the validator to a different server
* Recreate all other slaves with the `VALIDATORIP` changed to reflect the new validator server
* Remove the old validator from the round robin DNS
* Add the new validator to round robin DNS
* Create the new validator container (initially with no `SLAVEIPS` defined so folders are created)
* Create the slave IP named folders under /config/distribute for each slave, with their sample.conf and private ssh keys (as described above)
* Recreate the new validator with the slave IPs defined