From e3d564e4973bbf94ac63939f7128f44937521561 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sat, 16 Jul 2022 00:18:54 -0700 Subject: [PATCH 1/2] Refactor DDNS to support Google domains (via ddclient) --- .../config/cloudflare-ddns/docker-compose.yml | 21 ---------- homelab/server/config/ddns/.env | 1 + homelab/server/config/ddns/docker-compose.yml | 40 +++++++++++++++++++ 3 files changed, 41 insertions(+), 21 deletions(-) delete mode 100644 homelab/server/config/cloudflare-ddns/docker-compose.yml create mode 100644 homelab/server/config/ddns/.env create mode 100644 homelab/server/config/ddns/docker-compose.yml diff --git a/homelab/server/config/cloudflare-ddns/docker-compose.yml b/homelab/server/config/cloudflare-ddns/docker-compose.yml deleted file mode 100644 index c13489ba..00000000 --- a/homelab/server/config/cloudflare-ddns/docker-compose.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: "3" -services: - cloudflare-ddns: - image: oznu/cloudflare-ddns - container_name: ddns_cloudflare-ddns - logging: - driver: loki - options: - loki-url: http://localhost:3100/loki/api/v1/push - loki-batch-size: "50" - loki-retries: "1" - loki-timeout: "2s" - keep-file: "true" - - restart: "no" - environment: - - API_KEY=***REMOVED*** - - ZONE=jafner.net - - SUBDOMAIN=* - labels: - - traefik.enable=false diff --git a/homelab/server/config/ddns/.env b/homelab/server/config/ddns/.env new file mode 100644 index 00000000..5d781d4f --- /dev/null +++ b/homelab/server/config/ddns/.env @@ -0,0 +1 @@ +DOCKER_DATA=/home/joey/data/ddns \ No newline at end of file diff --git a/homelab/server/config/ddns/docker-compose.yml b/homelab/server/config/ddns/docker-compose.yml new file mode 100644 index 00000000..5955fc70 --- /dev/null +++ b/homelab/server/config/ddns/docker-compose.yml @@ -0,0 +1,40 @@ +version: "3" +services: + cloudflare: + image: oznu/cloudflare-ddns + container_name: ddns_cloudflare + logging: + driver: loki + options: + loki-url: http://localhost:3100/loki/api/v1/push + loki-batch-size: "50" + loki-retries: "1" + loki-timeout: "2s" + keep-file: "true" + restart: "no" + environment: + - API_KEY=***REMOVED*** + - ZONE=jafner.net + - SUBDOMAIN=* + labels: + - traefik.enable=false + ddclient: + image: linuxserver/ddclient + container_name: ddns_ddclient + logging: + driver: loki + options: + loki-url: http://localhost:3100/loki/api/v1/push + loki-batch-size: "50" + loki-retries: "1" + loki-timeout: "2s" + keep-file: "true" + restart: "no" + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - ${DOCKER_DATA}/ddclient:/config + labels: + - traefik.enable=false From 5a02a3ac1559ba7b8b482ff9ceafa30b36d9bcb9 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sat, 16 Jul 2022 00:21:10 -0700 Subject: [PATCH 2/2] Init megan-portfolio --- homelab/server/config/megan-portfolio/.env | 2 + .../config/megan-portfolio/docker-compose.yml | 44 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 homelab/server/config/megan-portfolio/.env create mode 100644 homelab/server/config/megan-portfolio/docker-compose.yml diff --git a/homelab/server/config/megan-portfolio/.env b/homelab/server/config/megan-portfolio/.env new file mode 100644 index 00000000..e29cd316 --- /dev/null +++ b/homelab/server/config/megan-portfolio/.env @@ -0,0 +1,2 @@ +DOCKER_DATA=/home/joey/data/megan-portfolio + diff --git a/homelab/server/config/megan-portfolio/docker-compose.yml b/homelab/server/config/megan-portfolio/docker-compose.yml new file mode 100644 index 00000000..3b306166 --- /dev/null +++ b/homelab/server/config/megan-portfolio/docker-compose.yml @@ -0,0 +1,44 @@ +version: '3.1' + +services: + megan-portfolio: + image: wordpress + container_name: wordpress_megan-portfolio + restart: "no" + environment: + WORDPRESS_DB_HOST: portfolio_db + WORDPRESS_DB_USER: wordpress + WORDPRESS_DB_PASSWORD: wordpress + WORDPRESS_DB_NAME: wordpressdb + volumes: + - ${DOCKER_DATA}/html:/var/www/html + labels: + - traefik.http.routers.megan-portfolio.rule=Host(`meganmcdonough.art`) + - traefik.http.routers.megan-portfolio.tls.certresolver=lets-encrypt + - traefik.port=80 + networks: + - web + - portfolio + depends_on: + - portfolio_db + + portfolio_db: + image: mysql:5.7 + container_name: wordpress_portfolio-db + restart: "no" + networks: + - portfolio + environment: + MYSQL_DATABASE: wordpressdb + MYSQL_USER: wordpress + MYSQL_PASSWORD: wordpress + MYSQL_RANDOM_ROOT_PASSWORD: '1' + volumes: + - ${DOCKER_DATA}/db:/var/lib/mysql + labels: + - traefik.enable=false + +networks: + web: + external: true + portfolio: