From 1f96c00bfc4d3dada5acad4cb8d35df6f9b29043 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sat, 24 Aug 2024 08:55:23 +0200 Subject: [PATCH] Revert "Remove ghost" This reverts commit 247e344a528b0df3dc9e3ffc083f25f65560ea12. --- Makefile | 2 +- .../caddy/config/bensuperpc.org/Caddyfile | 4 ++ infrastructure/ghost/docker-compose.ghost.yml | 45 +++++++++++++++++++ infrastructure/ghost/env/ghost.env | 6 +++ infrastructure/ghost/env/ghost_db.env | 4 ++ infrastructure/homepage/config/services.yaml | 4 ++ 6 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 infrastructure/ghost/docker-compose.ghost.yml create mode 100644 infrastructure/ghost/env/ghost.env create mode 100644 infrastructure/ghost/env/ghost_db.env diff --git a/Makefile b/Makefile index e8f41db..89a7ac0 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ DOCKER := docker -PROFILES := caddy wordpress adminer syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea it-tools privatebin homepage watchtower +PROFILES := caddy wordpress adminer ghost syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea it-tools privatebin homepage watchtower PROFILE_CMD := $(addprefix --profile ,$(PROFILES)) # gitea-runner transmission diff --git a/infrastructure/caddy/config/bensuperpc.org/Caddyfile b/infrastructure/caddy/config/bensuperpc.org/Caddyfile index 36c7406..e0221bb 100644 --- a/infrastructure/caddy/config/bensuperpc.org/Caddyfile +++ b/infrastructure/caddy/config/bensuperpc.org/Caddyfile @@ -105,6 +105,10 @@ homepage.bensuperpc.org { reverse_proxy homepage:3000 } +ghost.bensuperpc.org { + reverse_proxy ghost:2368 +} + link.bensuperpc.org { # TODO: Use service with database # Friendly links diff --git a/infrastructure/ghost/docker-compose.ghost.yml b/infrastructure/ghost/docker-compose.ghost.yml new file mode 100644 index 0000000..f1a2525 --- /dev/null +++ b/infrastructure/ghost/docker-compose.ghost.yml @@ -0,0 +1,45 @@ +services: + # ghost + ghost: + image: ghost:latest + container_name: ghost + profiles: + - ghost + restart: on-failure:5 + depends_on: + - ghost_db + - caddy + env_file: + - ./ghost/env/ghost.env + volumes: + - ghost_data:/var/lib/ghost/content:rw + networks: + - infra-network + security_opt: + - no-new-privileges:true + + # Database ghost + ghost_db: + image: mariadb:latest + container_name: ghost_db + profiles: + - database + - ghost + depends_on: + - caddy + restart: on-failure:5 + volumes: + - ghost_db:/var/lib/mysql:rw + env_file: + - ./ghost/env/ghost_db.env + command: '--default-authentication-plugin=mysql_native_password' + networks: + - infra-network + security_opt: + - no-new-privileges:true + +volumes: + ghost_db: + name: ghost_db + ghost_data: + name: ghost_data diff --git a/infrastructure/ghost/env/ghost.env b/infrastructure/ghost/env/ghost.env new file mode 100644 index 0000000..6bdb433 --- /dev/null +++ b/infrastructure/ghost/env/ghost.env @@ -0,0 +1,6 @@ +database__client=mysql +database__connection__host=ghost_db +database__connection__user=bensuperpc +database__connection__password=37hc06tWrS9DbFN2RZG8qdMD +database__connection__database=ghost +url=https://ghost.bensuperpc.org \ No newline at end of file diff --git a/infrastructure/ghost/env/ghost_db.env b/infrastructure/ghost/env/ghost_db.env new file mode 100644 index 0000000..d70a540 --- /dev/null +++ b/infrastructure/ghost/env/ghost_db.env @@ -0,0 +1,4 @@ +MARIADB_ROOT_PASSWORD=a03F1GYjpiHNAgAdB0ApYcb0Bp8ZAYh2 +MARIADB_USER=bensuperpc +MARIADB_PASSWORD=37hc06tWrS9DbFN2RZG8qdMD +MARIADB_DATABASE=ghost diff --git a/infrastructure/homepage/config/services.yaml b/infrastructure/homepage/config/services.yaml index 906b59d..c40fed9 100644 --- a/infrastructure/homepage/config/services.yaml +++ b/infrastructure/homepage/config/services.yaml @@ -7,6 +7,10 @@ icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/wordpress.png href: https://www.bensuperpc.org/ description: Wordpress + - ghost: + icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/ghost.png + href: https://ghost.bensuperpc.org/ + description: Ghost - uptime-kuma: icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/uptime-kuma.png href: https://uptimekuma.bensuperpc.org/