diff --git a/README.md b/README.md index 58c661d..9c744cd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ LETSENCRYPT_TEST=true ### **Database Configuration** ```bash -WORDPRESS_DB_PASSWORD=wordpress +WORDPRESS_DB_PASSWORD=wordpress # Used for MYSQL_PASSWORD AND MYSQL_ROOT_PASSWORD +MYSQL_DATABASE=wordpress +MYSQL_USER=wordpress ``` ### **Volume Configuration** @@ -51,7 +53,7 @@ HTML_VOLUME=test_html_staging ## 📂 Configuration Files -Two important Nginx configuration files are available in the project directory: +Two important Nginx configuration files are available in the project directory. After editing, perform a restart: ```bash ./default.conf # Automatically generated each time the script runs ./nginx.conf # Manually customizable configuration diff --git a/docker-compose.template.yml b/docker-compose.template.yml index 35122a2..f1d75b5 100644 --- a/docker-compose.template.yml +++ b/docker-compose.template.yml @@ -22,7 +22,12 @@ services: image: ${IMAGE_DATABASE:-database} container_name: ${COMPOSE_PROJECT_NAME}_database volumes: - - db:/var/lib/mysql + - db:/var/lib/mysql + environment: + - MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD:-fake} + - MYSQL_ROOT_PASSWORD=${WORDPRESS_DB_PASSWORD:-fake} + - MYSQL_DATABASE=${MYSQL_DATABASE:-wordpress} + - MYSQL_USER=${MYSQL_USER:-wordpress} logging: driver: "json-file" options: diff --git a/update-db b/update-db index d67f6c2..c1629ac 100755 --- a/update-db +++ b/update-db @@ -6,9 +6,6 @@ set +o allexport website="https://$VIRTUAL_HOST" DATABASE_SERVICE="database_${COMPOSE_PROJECT_NAME}" -MYSQL_USER=wordpress -WORDPRESS_DB_PASSWORD=wordpress -MYSQL_DATABASE=wordpress command="docker compose exec $DATABASE_SERVICE mariadb" echo $website