diff --git a/.env.sample b/.env.sample index c663322..0958678 100644 --- a/.env.sample +++ b/.env.sample @@ -27,4 +27,4 @@ COMPANY_EMAIL=my@company.com ADMIN_EMAIL=me@company.com SECRET_MYSQL_PASSWORD_VERSION=v1 -SECRET_ADMIN_PASSWORD_VERSION=v1 \ No newline at end of file +SECRET_MYSQL_ROOT_PASSWORD_VERSION=v1 \ No newline at end of file diff --git a/compose.yml b/compose.yml index 0535235..ed0611e 100644 --- a/compose.yml +++ b/compose.yml @@ -41,7 +41,6 @@ services: - akaunting-data:/var/www/html secrets: - mysql_password - - admin_password configs: - source: app_entrypoint target: /docker-entrypoint.sh @@ -62,9 +61,10 @@ services: - MYSQL_DATABASE=akaunting - MYSQL_USER=admin - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password - - MYSQL_RANDOM_ROOT_PASSWORD=yes + - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password secrets: - mysql_password + - mysql_root_password volumes: akaunting-db: @@ -74,9 +74,9 @@ secrets: mysql_password: external: true name: ${STACK_NAME}_mysql_password_${SECRET_MYSQL_PASSWORD_VERSION} - admin_password: + mysql_root_password: external: true - name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION} + name: ${STACK_NAME}_mysql_root_password_${SECRET_MYSQL_ROOT_PASSWORD_VERSION} networks: backend: diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 30a2c35..22634fd 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,7 +2,5 @@ DB_PASSWORD=$(cat /run/secrets/mysql_password) export DB_PASSWORD -ADMIN_PASSWORD=$(cat /run/secrets/admin_password) -export ADMIN_PASSWORD /usr/local/bin/akaunting.sh --start