From 74883023f347769e0092cc1d321ada46f121d5b7 Mon Sep 17 00:00:00 2001 From: Ammar Hussein Date: Tue, 19 Nov 2024 12:56:40 -0800 Subject: [PATCH 1/2] hardcode db_user rather than using a secret --- .env.sample | 1 - compose.yml | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.env.sample b/.env.sample index f6d6853..22255e8 100644 --- a/.env.sample +++ b/.env.sample @@ -7,6 +7,5 @@ DOMAIN=xwiki.example.com LETS_ENCRYPT_ENV=production -SECRET_DB_USERNAME_VERSION=v1 SECRET_DB_PASSWORD_VERSION=v1 SECRET_DB_ROOT_PASSWORD_VERSION=v1 diff --git a/compose.yml b/compose.yml index b23b7b6..712873d 100644 --- a/compose.yml +++ b/compose.yml @@ -4,14 +4,13 @@ services: app: image: "xwiki:stable-mysql-tomcat" environment: - - DB_USER_FILE=/run/secrets/db_username + - DB_USER=xwiki - DB_PASSWORD_FILE=/run/secrets/db_password - DB_DATABASE=xwiki - DB_HOST=${STACK_NAME}_db volumes: - xwiki-data:/usr/local/xwiki secrets: - - db_username - db_password networks: - proxy @@ -44,7 +43,7 @@ services: - mysql-data:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password - - MYSQL_USER_FILE=/run/secrets/db_username + - MYSQL_USER=xwiki - MYSQL_PASSWORD_FILE=/run/secrets/db_password - MYSQL_DATABASE=xwiki command: @@ -52,7 +51,6 @@ services: - "--collation-server=utf8mb4_bin" - "--explicit-defaults-for-timestamp=1" secrets: - - db_username - db_password - db_root_password @@ -66,9 +64,6 @@ volumes: xwiki-data: secrets: - db_username: - name: ${STACK_NAME}_db_username_${SECRET_DB_USERNAME_VERSION} - external: true db_password: name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} external: true From 2375b0eaa64f1e297827e2985f7b528819b1bebc Mon Sep 17 00:00:00 2001 From: Ammar Hussein Date: Tue, 19 Nov 2024 13:36:31 -0800 Subject: [PATCH 2/2] update readme to avoid failure in app initialization --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 913c3d8..a7db28a 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,6 @@ * `abra app config ` * `abra app deploy ` +> Warning: trying to access before db instance finishes initialization results in failure to initialize the xwiki instance, recommended to wait for about 5 minutes (that is plenty of time) before accessing the app from your browser. + For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).