Merge pull request 'set admin password via secret' (#77) from admin_password into main
continuous-integration/drone/push Build is failing

Reviewed-on: #77
Reviewed-by: stevensting <156+stevensting@noreply.git.coopcloud.tech>
This commit was merged in pull request #77.
This commit is contained in:
2026-09-09 19:25:18 +00:00
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -38,6 +38,7 @@ LETS_ENCRYPT_ENV=production
SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
SECRET_ADMIN_PASSWORD_VERSION=v1
# Mostly for compatibility with existing database dumps...
#WORDPRESS_TABLE_PREFIX=wp_
+1 -1
View File
@@ -27,7 +27,7 @@ core_install(){
ADMIN=akadmin
fi
chown www-data:www-data -R /var/www/html/wp-content
wp "core install --url=$DOMAIN --title=\"$TITLE\" --admin_user=$ADMIN --admin_email=$ADMIN_EMAIL --locale=$LOCALE --skip-email"
wp "core install --url=$DOMAIN --title=\"$TITLE\" --admin_user=$ADMIN --admin_password=\"\$(cat /run/secrets/admin_password)\" --admin_email=$ADMIN_EMAIL --locale=$LOCALE --skip-email"
wp "language core install $LOCALE"
wp "site switch-language $LOCALE"
wp "rewrite structure '/%year%/%monthnum%/%day%/%postname%/'"
+4
View File
@@ -25,6 +25,7 @@ services:
COMPOSER:
secrets:
- db_password
- admin_password
configs:
- source: php_uploads_conf
target: /usr/local/etc/php/conf.d/uploads.ini
@@ -101,6 +102,9 @@ secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
admin_password:
external: true
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
configs:
entrypoint_conf: