Automatically create user and skip setup page (#345)

* Added checks to docker-entrypoint

* Add init scripts feature

* Added backward compatibility

* Added auto user creation

* Updated README.md and env

* Use dbCheck for checking DB connection
This commit is contained in:
Ween Jiann
2021-05-13 09:41:08 +08:00
committed by GitHub
parent 8e9e7c47da
commit 6c68882449
5 changed files with 106 additions and 38 deletions

View File

@@ -31,21 +31,19 @@ git clone https://github.com/invoiceninja/dockerfiles.git
cd dockerfiles
```
Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `env` file, open this file up and insert your `APP_URL` and your `APP_KEY`
Instead of defining our environment variables inside our docker-compose.yml file we now define this in the `env` file, open this file up and insert your `APP_URL`, `APP_KEY` and update the rest of the variables as required.
```
APP_URL=http://in.localhost:8003/
APP_KEY=<insert your generated key in here>
APP_DEBUG=true
MULTI_DB_ENABLED=false
DB_HOST1=db
DB_PORT1=3306
DB_USERNAME1=ninja
DB_PASSWORD1=ninja
DB_DATABASE1=ninja
PHANTOMJS_PDF_GENERATION=false
REQUIRE_HTTPS=false
IN_USER_EMAIL=
IN_PASSWORD=
```
If `IN_USER_EMAIL` and `IN_PASSWORD` is not set the default user email and password is "admin@example.com" and "changeme!" respectively. You will use this for the initial login, thereafter, you can delete this two environment variables.
The `APP_KEY` can be generated by running
```bash