From a14b7e37c98e7edb5103599df84bfd19c231fd8a Mon Sep 17 00:00:00 2001 From: Brodin Date: Mon, 19 Aug 2024 14:18:53 -0400 Subject: [PATCH 1/3] FINALLY solved this --- README.md | 18 +++++++++-- stats/.gitignore | 1 + stats/docker-compose.yml | 64 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 stats/.gitignore create mode 100644 stats/docker-compose.yml diff --git a/README.md b/README.md index b5a4dea..b70a6ec 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,21 @@ # Docker Compose for my Media Server +A giant suite of web apps that I personally use on my local server. Some of them include: + * Arr - A collection of all the *arr apps like Radarr and Sonarr * Dashboard - Replies on Homarr and Dashdot for a top-level dashboard -* Mail - An email service (WIP) -* Nginx-Proxy - Handles reverse proxy and SSL certs +* Git Repo +* Nextcloud - Cloud storage and sharing * Plex - The Plex media server with stats * Readers - Various media readers that can be accessed via the browser -* Wordpress - for making a site \ No newline at end of file +* Sites - Various static sites I have. All of them are using the Ghost CMS + +All the apps use Nginx-Proxy which handles reverse proxy and SSL certs for every app. + + +## Adding a new app + +Use this checklist if you're having issue getting the app to run: + +* Allow ports on your machine (e.g. `ufw allow 80`) +* Set port forwarding on your router diff --git a/stats/.gitignore b/stats/.gitignore new file mode 100644 index 0000000..34b0d2f --- /dev/null +++ b/stats/.gitignore @@ -0,0 +1 @@ +noco/ \ No newline at end of file diff --git a/stats/docker-compose.yml b/stats/docker-compose.yml new file mode 100644 index 0000000..a2ff0d3 --- /dev/null +++ b/stats/docker-compose.yml @@ -0,0 +1,64 @@ +services: + share-db: + environment: + POSTGRES_DB: share-db + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + image: postgres + restart: always + volumes: + - ./data/sharedb:/var/lib/postgresql/data + noco: + container_name: noco + image: nocodb/nocodb:latest + depends_on: + - noco-db + ports: + - 3006:8080 + environment: + NC_DB: pg://noco-db:5432?u=postgres&p=password&d=database-noco + VIRTUAL_HOST: nocodb.brodin.rocks + LETSENCRYPT_HOST: nocodb.brodin.rocks + LETSENCRYPT_EMAIL: ${EMAIL} + volumes: + - ./noco:/usr/app/data + noco-db: + environment: + POSTGRES_DB: database-noco + POSTGRES_PASSWORD: password + POSTGRES_USER: postgres + image: postgres + restart: always + volumes: + - ./data/nocodb:/var/lib/postgresql/data + metabase: + container_name: metabase + image: metabase/metabase:latest + depends_on: + - metabase-db + ports: + - 4018:3000 + environment: + MB_DB_TYPE: postgres + MB_DB_DBNAME: ${PGDATABASE:-postgres} + MB_DB_PORT: 5432 + MB_DB_USER: ${PGUSER:-postgres} + MB_DB_PASS: ${PGPASSWORD} + MB_DB_HOST: ${PGHOST} + VIRTUAL_HOST: "metabase.brodin.rocks" + LETSENCRYPT_HOST: "metabase.brodin.rocks" + LETSENCRYPT_EMAIL: ${EMAIL} + metabase-db: + container_name: metabase-db + image: postgres:15.4 + restart: always + environment: + POSTGRES_PASSWORD: ${PGPASSWORD} + POSTGRES_USER: ${PGUSER:-postgres} + POSTGRES_DB: ${PGDATABASE:-postgres} + volumes: + - ./data/metabase:/var/lib/postgresql/data +networks: + default: + name: nginx-proxy + external: true \ No newline at end of file From 0215f55009fa0f4068eedf153eedaebbe43379ac Mon Sep 17 00:00:00 2001 From: Brodin Date: Thu, 29 Aug 2024 17:59:10 -0400 Subject: [PATCH 2/3] wrapping up changes --- stats/docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stats/docker-compose.yml b/stats/docker-compose.yml index a2ff0d3..57b4f72 100644 --- a/stats/docker-compose.yml +++ b/stats/docker-compose.yml @@ -17,8 +17,8 @@ services: - 3006:8080 environment: NC_DB: pg://noco-db:5432?u=postgres&p=password&d=database-noco - VIRTUAL_HOST: nocodb.brodin.rocks - LETSENCRYPT_HOST: nocodb.brodin.rocks + VIRTUAL_HOST: sheets.phillybotc.com + LETSENCRYPT_HOST: sheets.phillybotc.com LETSENCRYPT_EMAIL: ${EMAIL} volumes: - ./noco:/usr/app/data @@ -45,8 +45,8 @@ services: MB_DB_USER: ${PGUSER:-postgres} MB_DB_PASS: ${PGPASSWORD} MB_DB_HOST: ${PGHOST} - VIRTUAL_HOST: "metabase.brodin.rocks" - LETSENCRYPT_HOST: "metabase.brodin.rocks" + VIRTUAL_HOST: "dash.phillybotc.com" + LETSENCRYPT_HOST: "dash.phillybotc.com" LETSENCRYPT_EMAIL: ${EMAIL} metabase-db: container_name: metabase-db From ce29e0204923cb26a026f1b4f6a4ed6fb5e2ace4 Mon Sep 17 00:00:00 2001 From: Brodin Date: Thu, 29 Aug 2024 19:08:19 -0400 Subject: [PATCH 3/3] adding example env --- stats/.env.example | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 stats/.env.example diff --git a/stats/.env.example b/stats/.env.example new file mode 100644 index 0000000..cad919a --- /dev/null +++ b/stats/.env.example @@ -0,0 +1,48 @@ +DBPASS=password +REDISPASS=password +EMAIL=bjageman@gmail.com +TZ=America/New_York +DOMAIN=brodin.rocks + +# For all variables, see https://docs.lightdash.com/self-host/customize-deployment/environment-variables + +PORT=4018 + +SITE_URL=http://localhost:4018 + +PGHOST=metabase-db +PGPORT=5432 +PGUSER=postgres +PGDATABASE=postgres +PGPASSWORD="password" +LIGHTDASH_SECRET="not very secret" + +SECURE_COOKIES=false +TRUST_PROXY=false +LIGHTDASH_LOG_LEVEL=debug +LIGHTDASH_QUERY_MAX_LIMIT=5000 + + +NODE_ENV=production +LIGHTDASH_LOG_LEVEL=debug +LIGHTDASH_QUERY_MAX_LIMIT=5000 + +ALLOW_MULTIPLE_ORGS=false + +DBT_PROJECT_DIR=./dbt + +SCHEDULER_ENABLED=true +LIGHTDASH_MAX_PAYLOAD=5mb + +#AUTH_DISABLE_PASSWORD_AUTHENTICATION= +#AUTH_GOOGLE_OAUTH2_CLIENT_ID= +#AUTH_GOOGLE_OAUTH2_CLIENT_SECRET= + +#EMAIL_SMTP_HOST= +#EMAIL_SMTP_PORT= +#EMAIL_SMTP_SECURE= +#EMAIL_SMTP_USER= +#EMAIL_SMTP_PASSWORD= +#EMAIL_SMTP_ALLOW_INVALID_CERT= +#EMAIL_SMTP_SENDER_NAME= +#EMAIL_SMTP_SENDER_EMAIL= \ No newline at end of file