From 0e8e100764dfc396df4abe6bf168bc868e2b58f1 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Sun, 16 Feb 2025 17:48:53 +0100 Subject: [PATCH 1/3] chore: initial wp setup --- kodokanjudoeste/docker-compose.yaml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 kodokanjudoeste/docker-compose.yaml diff --git a/kodokanjudoeste/docker-compose.yaml b/kodokanjudoeste/docker-compose.yaml new file mode 100644 index 0000000..51069bb --- /dev/null +++ b/kodokanjudoeste/docker-compose.yaml @@ -0,0 +1,41 @@ +services: + app: + image: wordpress:6.7-php8.1-apache + restart: unless-stopped + networks: + - proxy + - internal + env_file: + - .db.env + - .proxy.env + - .wordpress.env + depends_on: + - db + db: + image: mariadb:11.6.2-ubi9 + command: '--default-authentication-plugin=mysql_native_password' + restart: unless-stopped + networks: + - internal + env_file: + - .db.env + +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" -- 2.47.2 From 0d67d58f063ca318864d7deabc8bd2164c79371d Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Sun, 16 Feb 2025 19:26:05 +0100 Subject: [PATCH 2/3] chore: final docker compose version for wordpress --- .gitignore | 1 + kodokanjudoeste/docker-compose.yaml | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) 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 index 51069bb..69fd923 100644 --- a/kodokanjudoeste/docker-compose.yaml +++ b/kodokanjudoeste/docker-compose.yaml @@ -9,16 +9,34 @@ services: - .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 + db: + condition: service_healthy db: - image: mariadb:11.6.2-ubi9 - command: '--default-authentication-plugin=mysql_native_password' + 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: -- 2.47.2 From df7c1e19f1f06acf6688eb7355ee89b8b696737b Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Sun, 16 Feb 2025 19:28:24 +0100 Subject: [PATCH 3/3] chore: fix lint --- kodokanjudoeste/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kodokanjudoeste/docker-compose.yaml b/kodokanjudoeste/docker-compose.yaml index 69fd923..4a5ec69 100644 --- a/kodokanjudoeste/docker-compose.yaml +++ b/kodokanjudoeste/docker-compose.yaml @@ -10,7 +10,7 @@ services: - .proxy.env - .wordpress.env volumes: - - data:/var/www/html + - data:/var/www/html healthcheck: test: "test \"$(curl -Lso /dev/null -w''%{http_code}'' http://localhost:80)\" = \"200\"" start_period: 5s -- 2.47.2