Bugfix in .env (DB_HOST, caused by renaming in compose.yml, see prev commits), explanation about keys and passwords
This commit is contained in:
parent
4eb0203b2d
commit
58fac81dd9
4 changed files with 19 additions and 11 deletions
21
.env
21
.env
|
@ -1,17 +1,22 @@
|
|||
APP_HOST=0.0.0.0
|
||||
APP_PORT=8000
|
||||
|
||||
# Generate a strong secret key
|
||||
# Generate 2 strong secret keys
|
||||
#
|
||||
# On Linux: tr -dc A-Za-z0-9_- </dev/urandom | head -c 44
|
||||
# With Python: import secrets; secrets.token_urlsafe(32)
|
||||
# In Linux terminal:
|
||||
# tr -dc A-Za-z0-9_- </dev/urandom | head -c 44
|
||||
# Or in Python:
|
||||
# import secrets
|
||||
# print(secrets.token_urlsafe(32))
|
||||
#
|
||||
# If this variable is not set,
|
||||
# the key is generated automatically
|
||||
#SECRET_KEY=secret
|
||||
# If these variables are not set,
|
||||
# the keys are generated automatically
|
||||
#
|
||||
#SESSION_KEY=secret
|
||||
#CSRF_KEY=secret
|
||||
|
||||
DB_HOST=${REPO_NAME_SNAKE}_db
|
||||
DB_HOST=${REPO_NAME_KEBAB}-db
|
||||
DB_PORT=3306
|
||||
DB_USER=${REPO_NAME_SNAKE}
|
||||
DB_PASSWORD=password
|
||||
DB_PASSWORD=password # Generate a password using the same method
|
||||
DB_DATABASE=${REPO_NAME_SNAKE}
|
||||
|
|
2
.env_db
2
.env_db
|
@ -1,5 +1,5 @@
|
|||
MYSQL_PORT=3306
|
||||
MYSQL_RANDOM_ROOT_PASSWORD=true
|
||||
MYSQL_USER=${REPO_NAME_SNAKE}
|
||||
MYSQL_PASSWORD=password
|
||||
MYSQL_PASSWORD=password # Must be the same as in .env
|
||||
MYSQL_DATABASE=${REPO_NAME_SNAKE}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
DEBUG=true
|
||||
SECRET_KEY=debug
|
||||
SESSION_KEY=debug
|
||||
CSRF_KEY=debug
|
||||
|
||||
APP_HOST=127.0.0.1
|
||||
APP_PORT=8000
|
||||
|
|
|
@ -35,7 +35,9 @@ corresponding to your database structure
|
|||
as explained below ([Structure > Database](#database))
|
||||
7. Check if `Makefile`, `Dockerfile`, `docker-compose.yml` are correct
|
||||
8. Run the formatter and linters (`make format`, then `make check`)
|
||||
9. Edit the `version_code` file if needed,
|
||||
9. Open `.env` and `.env_db`, generate secret keys and the database password
|
||||
as explained in the comment above `SESSION_KEY=`
|
||||
10. Edit the `version_code` file if needed,
|
||||
build a docker image and [publish](#publishing-app) it
|
||||
|
||||
### Makefile
|
||||
|
|
Loading…
Reference in a new issue