Skip to content

Commit 40484da

Browse files
Add note about .env to deployment doc
1 parent afd1a5a commit 40484da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/deployment.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ We can run commands and Bash scripts as the superuser (`root`) using the [`sudo`
5151

5252
To configure the environment variables for the service, you can either edit the `.env` file and/or add them to the systemd service using `systemctl edit`.
5353

54-
To edit the environment file:
54+
To create and edit the environment file, which should have access restricted to only the Python app (the Gunicorn service):
5555

5656
```bash
5757
sudo mkdir --parents /opt/sort
58+
sudo touch /opt/sort/.env
59+
sudo chown gunicorn:gunicorn /opt/sort/.env
60+
sudo chmod 600 /opt/sort/.env
5861
sudo nano /opt/sort/.env
5962
```
6063

@@ -186,7 +189,7 @@ On our PostgreSQL instance, this should create a database named `sort` with a us
186189

187190
## SSL Certificates
188191

189-
See: ITS Wiki [SSL Certificates/Howto](https://itswiki.shef.ac.uk/wiki/SSL_Certificates/Howto) for the commands to generate a Certificate Signing Request (CSR) using [OpenSSL](https://docs.openssl.org/3.3/man1/openssl-req/#options) with an unencrypted private key.
192+
See: ITS Wiki [SSL Certificates/Howto](https://itswiki.shef.ac.uk/wiki/SSL_Certificates/Howto) for the commands to generate a Certificate Signing Request (CSR) using [OpenSSL](https://docs.openssl.org/3.3/man1/openssl-req/#options) with an unencrypted private key.
190193

191194
We can install the private key
192195

0 commit comments

Comments
 (0)