From 9f650639bb866463d1f3f960ec172294f80308ee Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Fri, 7 Mar 2025 16:44:32 +0100 Subject: [PATCH] feat: add `kodokanjudoeste.org` WP hosting (#38) Reviewed-on: https://git.poldebra.me/polpetta/server-dotfiles/pulls/38 Co-authored-by: Davide Polonio Co-committed-by: Davide Polonio --- .gitignore | 1 + kodokanjudoeste/docker-compose.yaml | 59 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 kodokanjudoeste/docker-compose.yaml diff --git a/.gitignore b/.gitignore index a2566a3..79c76b5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ env-searxng .*.env nextcloud/db.env nextcloud/nextcloud.env +kodokanjudoeste/import/ diff --git a/kodokanjudoeste/docker-compose.yaml b/kodokanjudoeste/docker-compose.yaml new file mode 100644 index 0000000..4a5ec69 --- /dev/null +++ b/kodokanjudoeste/docker-compose.yaml @@ -0,0 +1,59 @@ +services: + app: + image: wordpress:6.7-php8.1-apache + restart: unless-stopped + networks: + - proxy + - internal + env_file: + - .db.env + - .proxy.env + - .wordpress.env + volumes: + - data:/var/www/html + healthcheck: + test: "test \"$(curl -Lso /dev/null -w''%{http_code}'' http://localhost:80)\" = \"200\"" + start_period: 5s + interval: 60s + timeout: 10s + retries: 3 + depends_on: + db: + condition: service_healthy + db: + image: mysql:8.4-oracle + restart: unless-stopped + healthcheck: + test: "mysql $$MYSQL_DATABASE -u$$MYSQL_USER -p$$MYSQL_PASSWORD -e 'SELECT 1;'" + start_period: 10s + interval: 10s + timeout: 5s + retries: 3 + networks: + - internal + env_file: + - .db.env + volumes: + # Enable ONLY for importing the db again + # - ./import:/docker-entrypoint-initdb.d:ro + - db:/var/lib/mysql + +networks: + proxy: + external: true + internal: + +volumes: + db: + driver: local + driver_opts: + type: none + o: bind + device: "/srv/docker/kodokanjudoeste/db" + + data: + driver: local + driver_opts: + type: none + o: bind + device: "/srv/docker/kodokanjudoeste/data"