Optimize Docker (#575)

* reduce docker dev size

* reduce docker prod size

* fix lint

* add gunicorn

* fix bandit reported issues

* add docs external link icon

* add env vars to docs

* add permission to docker

* merge to one backend Dockerfile

* fix codefactor issues

* add docs for puid/pgid

* add docker healthcheck
This commit is contained in:
wengtad
2021-06-23 02:22:31 +08:00
committed by GitHub
parent 6320ba7ec5
commit 999d0d4322
34 changed files with 465 additions and 193 deletions

View File

@@ -5,16 +5,16 @@
To make the setup of a Reverse Proxy much easier, Linuxserver.io developed [SWAG](https://github.com/linuxserver/docker-swag){:target="_blank"}
To make the setup of a Reverse Proxy much easier, Linuxserver.io developed [SWAG](https://github.com/linuxserver/docker-swag)
SWAG - Secure Web Application Gateway (formerly known as letsencrypt, no relation to Let's Encrypt™) sets up an Nginx web server and reverse proxy with PHP support and a built-in certbot client that automates free SSL server certificate generation and renewal processes (Let's Encrypt and ZeroSSL). It also contains fail2ban for intrusion prevention.
## Step 1: Get a domain
The first step is to grab a dynamic DNS if you don't have your own subdomain already. You can get this from for example [DuckDNS](https://www.duckdns.org){:target="_blank"}.
The first step is to grab a dynamic DNS if you don't have your own subdomain already. You can get this from for example [DuckDNS](https://www.duckdns.org).
## Step 2: Set-up SWAG
Then you will need to set up SWAG, the variables of the docker-compose are explained on the Github page of [SWAG](https://github.com/linuxserver/docker-swag){:target="_blank"}.
Then you will need to set up SWAG, the variables of the docker-compose are explained on the Github page of [SWAG](https://github.com/linuxserver/docker-swag).
This is an example of how to set it up using duckdns and docker-compose.
!!! example "docker-compose.yml"