Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP env variables not set based off environment variables #91

Open
JavonneM opened this issue Apr 10, 2023 · 0 comments
Open

PHP env variables not set based off environment variables #91

JavonneM opened this issue Apr 10, 2023 · 0 comments

Comments

@JavonneM
Copy link

The docker image seems to be a stateful container. Currently there is no way to dynamically set the php .env file through the docker env variables.
Typically these variables can be set via the env variables (things such as APP_KEY and database host/port etc), however it seems that only some of the variables such as the database related env vars get set when the container is started with AKAUNTING_SETUP=true, but this also recreates the first company, and admin users duplicating the company and users that have already been create and locking users out since the APP_KEY gets changed.

A simple situation, I need to move my database from its current host to a new host, in order to change this I needed to do the following

docker-compose up --detach
docker cp <akaunting_container>:/var/www/html/.env ./env
vim .env # and change the env file as needed
docker cp .env <akaunting_container>:/var/www/html/.env
docker restart <akaunting_container>

Another way this can easily be show is by simply deleting the volume that is attached to the Akaunting app (not the database), now when recreating the container using docker compose, the database related variables and the APP_KEY is never passed into the newly generated /var/www/html/.env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant