Add guidance on what to edit in .env
This commit is contained in:
parent
173eaf44a0
commit
589302a87d
@ -13,6 +13,8 @@ Get the last version from the repository: `git clone https://github.com/vabene11
|
|||||||
|
|
||||||
Move it to the `/var/www` directory: `mv recipes /var/www`
|
Move it to the `/var/www` directory: `mv recipes /var/www`
|
||||||
|
|
||||||
|
Change to the directory: `cd /var/www/recipes`
|
||||||
|
|
||||||
Give the user permissions: `chown -R recipes:www-data /var/www/recipes`
|
Give the user permissions: `chown -R recipes:www-data /var/www/recipes`
|
||||||
|
|
||||||
Create virtual env: `python3.9 -m venv /var/www/recipes`
|
Create virtual env: `python3.9 -m venv /var/www/recipes`
|
||||||
@ -54,6 +56,12 @@ Download the `.env` configuration file and **edit it accordingly**.
|
|||||||
wget https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /var/www/recipes/.env
|
wget https://raw.githubusercontent.com/vabene1111/recipes/develop/.env.template -O /var/www/recipes/.env
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Things to edit:
|
||||||
|
- `SECRET_KEY`: use something secure.
|
||||||
|
- `POSTGRES_HOST`: probably 127.0.0.1.
|
||||||
|
- `POSTGRES_PASSWORD`: the password we set earlier when setting up djangodb.
|
||||||
|
- `STATIC_URL`, `MEDIA_URL`: these will be in `/var/www/recipes`, under `static/` and `media/` respectively.
|
||||||
|
|
||||||
## Initialize the application
|
## Initialize the application
|
||||||
|
|
||||||
Execute `export $(cat /var/www/recipes/.env |grep "^[^#]" | xargs)` to load variables from `/var/www/recipes/.env`
|
Execute `export $(cat /var/www/recipes/.env |grep "^[^#]" | xargs)` to load variables from `/var/www/recipes/.env`
|
||||||
|
Loading…
Reference in New Issue
Block a user