From e21a135c7d193acaf93a0dd57457856c34b43cd7 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Fri, 23 Apr 2021 21:06:42 +0200 Subject: [PATCH] Added podgrab nginx config --- README.md | 27 ++++++--------------- nginx/.env.example | 6 +++++ nginx/sites-available/podgrab.conf.template | 15 ++++++++++++ vim/de | 3 ++- 4 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 nginx/sites-available/podgrab.conf.template diff --git a/README.md b/README.md index 6ef5b35..72ab414 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,5 @@ - - - # self-hosting + # Contents The repo contains setup guides for the following: @@ -35,9 +16,11 @@ Each directory contains (or will contain) its own `README.md` to aid with the installation of that specific setup. # General info + This info applies to all configs. ## Docker + All the setups named above use Docker and docker-compose. If you're on a Linux-based server, you can find both `docker` and `docker-compose` in your package manager (do note that the Docker package might be called `docker.io`). @@ -45,23 +28,27 @@ Otherwise, the install instructions can be found [here](https://docs.docker.com/engine/install/). ## Configuration + Most configuration can be done using a `.env` file with a provided `.env.example` file to start from. This means that you never have to edit the compose files, unless you wish to deviate from the default format. ## Building the image + You can build the container image using the command `docker-compose build`. This will build all services specified in the `docker-compose.yml` file. Any build configuration/environment variables can be defined in a `.env` file. A `.env.example` file is given for each configuration. ## Running the container + For running the server, we can use `docker-compose up -d`. This will start the service in the background. You can then see any logs using `docker-compose logs`. If you want the logs to update automatically, use `docker-compose logs -f`. # Why did I make this? + Well, I just wanted to put all my knowledge in one basket. this makes it easier to manage and share with others. I spend a lot of time tweaking these configs and figuring out how they work best (for me at least), and wanted to share this diff --git a/nginx/.env.example b/nginx/.env.example index 39f272a..d63211e 100644 --- a/nginx/.env.example +++ b/nginx/.env.example @@ -57,3 +57,9 @@ PORTAINER_HOST=portainer_app_1 GITEA_DOMAIN= ### Hostname GITEA_HOST=gitea_app_1 + +## Podgrab +### Domain name +PODGRAB_DOMAIN= +### Hostname +PODGRAB_HOST=podgrab_app_1 diff --git a/nginx/sites-available/podgrab.conf.template b/nginx/sites-available/podgrab.conf.template new file mode 100644 index 0000000..81ef710 --- /dev/null +++ b/nginx/sites-available/podgrab.conf.template @@ -0,0 +1,15 @@ +server { + # SSL Key locations + ssl_certificate /etc/letsencrypt/live/${PODGRAB_DOMAIN}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/${PODGRAB_DOMAIN}/privkey.pem; + listen ${HTTPS_PORT} ssl; + listen [::]:${HTTPS_PORT} ssl; + + server_name ${PODGRAB_DOMAIN}; + + location / { + resolver 127.0.0.11; + proxy_pass http://${PODGRAB_HOST}:8080/; + } +} + diff --git a/vim/de b/vim/de index 18f7acf..fb00846 100755 --- a/vim/de +++ b/vim/de @@ -1,2 +1,3 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + docker run --rm -it -v "$1":/data -w '/data' chewingbever/nvim:latest