From 3278e671ca04daf630efed46a3aa7f3a89c39c9a Mon Sep 17 00:00:00 2001 From: Liosha84 Date: Tue, 17 Nov 2026 23:45:14 +0100 Subject: [PATCH] Template: random database passwords from project variables WORDPRESS_DB_PASSWORD and MARIADB_ROOT_PASSWORD instead of change_me values: the one-click deploy on Jambotron generates them. Co-Authored-By: Claude Opus 5.5 --- README.md | 6 +++--- docker-compose.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f00a40..51c9104 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ A ready-made template for [Jambotron](https://jambotron.com): one `docker-compos 1. Sign in to [jambotron.com](https://jambotron.com). 2. Press **Deploy** on the **WordPress** card (home page or an empty projects page). -3. Jambotron uploads this template, adds an HTTPS subdomain to the `wordpress` service (port 80) and starts the deploy. -4. Open the address and finish the WordPress installer (site title, admin user). **Change the database passwords** in `docker-compose.yml` before the first deploy if the site is meant to stay. +3. Jambotron uploads this template, generates random database passwords (project variables `WORDPRESS_DB_PASSWORD` and `MARIADB_ROOT_PASSWORD`), adds an HTTPS subdomain to the `wordpress` service (port 80) and starts the deploy. +4. Open the address and finish the WordPress installer (site title, admin user). ## Deploy it yourself -Download this repository as a ZIP, create a project on Jambotron, upload the ZIP, pick `docker-compose.yml`, deploy and add a domain to the `wordpress` service, port 80. Or point a project at this repository (deploy from Git). +Download this repository as a ZIP, create a project on Jambotron, upload the ZIP, pick `docker-compose.yml`, set the project variables `WORDPRESS_DB_PASSWORD` and `MARIADB_ROOT_PASSWORD`, deploy and add a domain to the `wordpress` service, port 80. Or point a project at this repository (deploy from Git). ## Data diff --git a/docker-compose.yml b/docker-compose.yml index e078aaf..8a5b12c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ # WordPress + MariaDB — сайт или блог. # На Jambotron: деплой → домен на сервис wordpress, порт 80 → мастер установки WordPress. -# Пароли базы ниже — пример: поменяйте их до первого деплоя, если сайт останется надолго. +# WORDPRESS_DB_PASSWORD и MARIADB_ROOT_PASSWORD — переменные проекта: деплой в один клик создаёт их случайными. services: wordpress-db: image: mariadb:11 @@ -8,8 +8,8 @@ services: environment: MARIADB_DATABASE: wordpress MARIADB_USER: wordpress - MARIADB_PASSWORD: change_me_wp_pass - MARIADB_ROOT_PASSWORD: change_me_root_pass + MARIADB_PASSWORD: ${WORDPRESS_DB_PASSWORD:?set WORDPRESS_DB_PASSWORD} + MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:?set MARIADB_ROOT_PASSWORD} healthcheck: test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] interval: 5s @@ -32,7 +32,7 @@ services: WORDPRESS_DB_HOST: wordpress-db WORDPRESS_DB_NAME: wordpress WORDPRESS_DB_USER: wordpress - WORDPRESS_DB_PASSWORD: change_me_wp_pass + WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD} # HTTPS обрывается на прокси Jambotron; образ WordPress сам читает X-Forwarded-Proto volumes: # Темы, плагины и загрузки