diff --git a/README.md b/README.md index 479e847..4c9648a 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,16 @@ ports: ``` and reverse proxy to `http://localhost:4000`. +If you don't already have a reverse proxy on the machine, I recommend installing +[Nginx Proxy Manager](https://nginxproxymanager.com/), which is a GUI for Nginx +that makes it easy to configure and modify as your hosting needs change. By +adding NPM to cannery's `docker-compose.yml`, you can avoid needing to bind any +ports to your machine and have all the internal traffic routed through the +generated docker network, which can be a bit more secure. The example +configuration is commented out in the `docker-compose.yml` file, and more +information can be found on their documentation +[here](https://nginxproxymanager.com/setup/). + # Configuration You can use the following environment variables to configure Cannery in diff --git a/docker-compose.yml b/docker-compose.yml index b50f30f..68f24b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,4 +45,47 @@ services: - POSTGRES_DB="cannery" restart: always volumes: - - ./data:/var/lib/postgresql/data + - ./cannery/data:/var/lib/postgresql/data + + # Optional, if you don't have a reverse proxy set up already. You can replace + # this with any other reverse proxy like nginx, apache or caddy if you would + # like something more minimalist. + + # nginx: + # image: jc21/nginx-proxy-manager + # container_name: nginx + # restart: on-failure + # ports: + # - 443:443 + # - 80:80 + # # Access via http://localhost:81, although once you access this, you can + # # reverse proxy itself to a domain name to control it from anywhere if + # # you'd like, and then you can remove the following line + # - 127.0.0.1:81:81 + # # expose: + # # - 81 + # environment: + # # DISABLE_IPV6: 'true' + # DB_MYSQL_HOST: "nginx-db" + # DB_MYSQL_NAME: "nginx" + # DB_MYSQL_PASSWORD: "my-password" + # DB_MYSQL_PORT: 3306 + # DB_MYSQL_USER: "nginx" + # PGID: 9000 + # PUID: 9000 + # volumes: + # - /etc/letsencrypt:/etc/letsencrypt + # - ./nginx/data:/data + # - /tmp:/tmp + + # nginx-db: + # image: 'jc21/mariadb-aria:latest' + # container_name: nginx-db + # restart: on-failure + # environment: + # MYSQL_DATABASE: 'nginx' + # MYSQL_PASSWORD: 'my-password' + # MYSQL_ROOT_PASSWORD: 'my-root-password' + # MYSQL_USER: 'nginx' + # volumes: + # - ./nginx/mysql:/var/lib/mysql