Fix db issues #1

Merged
kawaiipunk merged 2 commits from ammar_test into main 2024-11-20 15:35:29 +00:00
3 changed files with 4 additions and 8 deletions

View File

@ -7,6 +7,5 @@ DOMAIN=xwiki.example.com
LETS_ENCRYPT_ENV=production LETS_ENCRYPT_ENV=production
SECRET_DB_USERNAME_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1 SECRET_DB_PASSWORD_VERSION=v1
SECRET_DB_ROOT_PASSWORD_VERSION=v1 SECRET_DB_ROOT_PASSWORD_VERSION=v1

View File

@ -21,4 +21,6 @@
* `abra app config <app-name>` * `abra app config <app-name>`
* `abra app deploy <app-name>` * `abra app deploy <app-name>`
> Warning: trying to access <app-name> 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). For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).

View File

@ -4,14 +4,13 @@ services:
app: app:
image: "xwiki:stable-mysql-tomcat" image: "xwiki:stable-mysql-tomcat"
environment: environment:
- DB_USER_FILE=/run/secrets/db_username - DB_USER=xwiki
- DB_PASSWORD_FILE=/run/secrets/db_password - DB_PASSWORD_FILE=/run/secrets/db_password
- DB_DATABASE=xwiki - DB_DATABASE=xwiki
- DB_HOST=${STACK_NAME}_db - DB_HOST=${STACK_NAME}_db
volumes: volumes:
- xwiki-data:/usr/local/xwiki - xwiki-data:/usr/local/xwiki
secrets: secrets:
- db_username
- db_password - db_password
networks: networks:
- proxy - proxy
@ -44,7 +43,7 @@ services:
- mysql-data:/var/lib/mysql - mysql-data:/var/lib/mysql
environment: environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password - 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_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_DATABASE=xwiki - MYSQL_DATABASE=xwiki
command: command:
@ -52,7 +51,6 @@ services:
- "--collation-server=utf8mb4_bin" - "--collation-server=utf8mb4_bin"
- "--explicit-defaults-for-timestamp=1" - "--explicit-defaults-for-timestamp=1"
secrets: secrets:
- db_username
- db_password - db_password
- db_root_password - db_root_password
@ -66,9 +64,6 @@ volumes:
xwiki-data: xwiki-data:
secrets: secrets:
db_username:
name: ${STACK_NAME}_db_username_${SECRET_DB_USERNAME_VERSION}
external: true
db_password: db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION} name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true external: true