Skip to content

Commit

Permalink
chore: add missing environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
psanders committed Dec 21, 2023
1 parent 72423d3 commit 6b2a60a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# General config
API_ENDPOINT=http://localhost:6789/v1
APP_URL=http://localhost:8080
LOGS_LEVEL=verbose

Expand All @@ -21,7 +22,8 @@ SMTP_AUTH_PASS=secret
SMTP_SENDER=Goodtok Info <[email protected]>

# Database and encryption config
# Create a new encryption key with cloack (https://cloack.47ng.com)
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/goodtok
CLOAK_ENCRYPTION_KEY=/* Generate a new key with cloack cli or https://cloak.47ng.com/ */
CLOAK_ENCRYPTION_KEY=k1.aesgcm256.MmPSvzCG9fk654bAbl30tsqq4h9d3N4F11hlue8bGAY=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SMTP_SENDER=Goodtok Info <[email protected]>
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/goodtok
CLOAK_ENCRYPTION_KEY=/* Generate a new key with cloack cli or https://cloak.47ng.com/ */
CLOAK_ENCRYPTION_KEY=k1.aesgcm256.MmPSvzCG9fk654bAbl30tsqq4h9d3N4F11hlue8bGAY=
```

Finally, run the following command to start the application:
Expand Down
6 changes: 4 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
restart: unless-stopped
environment:
# Must be accessible from the browser
API_ENDPOINT: http://localhost:6789/v1
API_ENDPOINT: ${API_ENDPOINT}
LOGS_LEVEL: ${LOGS_LEVEL}
ports:
- 8080:8080
Expand All @@ -21,11 +21,13 @@ services:
OWNER_PASSWORD: ${OWNER_PASSWORD}
CLOAK_ENCRYPTION_KEY: ${CLOAK_ENCRYPTION_KEY}
DATABASE_URL: ${DATABASE_URL}
LOGS_LEVEL: ${LOGS_LEVEL}
SIGNALING_HOST: ${SIGNALING_HOST}
SIGNALING_PORT: ${SIGNALING_PORT}
SMTP_HOST: ${SMTP_HOST}
SMTP_AUTH_USER: ${SMTP_AUTH_USER}
SMTP_AUTH_PASS: ${SMTP_AUTH_PASS}
SMTP_SENDER: ${SMTP_SENDER}
LOGS_LEVEL: ${LOGS_LEVEL}
ports:
- 6789:6789

Expand Down
4 changes: 3 additions & 1 deletion docs/docs/self-hosting/deploy-with-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Next, create a `.env` file with the following content:

```bash
# General config
API_ENDPOINT=http://localhost:6789/v1
APP_URL=http://localhost:8080
LOGS_LEVEL=verbose

Expand All @@ -44,12 +45,13 @@ SMTP_SENDER=Goodtok Info <[email protected]>
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/goodtok
CLOAK_ENCRYPTION_KEY=/* Generate a new key with cloack cli or https://cloak.47ng.com/ */
CLOAK_ENCRYPTION_KEY=k1.aesgcm256.MmPSvzCG9fk654bAbl30tsqq4h9d3N4F11hlue8bGAY=
```

Few important things to note:

- Please be sure to update all secrets with your own values
- The `API_ENDPOINT` must be the URL where the API will be accessible. For example, if you are running the application locally, you can use `http://localhost:6789/v1`. If you are running the application on a server, you can use, for example, `https://api.goodtok.example.com/v1`
- The `APP_URL` must be the URL where the application will be accessible. For example, if you are running the application locally, you can use `http://localhost:8080`. If you are running the application on a server, you can use, for example, `https://goodtok.example.com`
- The `SIGNALING_HOST` must be the URL where the signaling server will be accessible. For example, if you are running the application locally, you can use `localhost`. If you are running the application on a server, you can use, for example, `goodtok.example.com`
- The `SIGNALLING_PORT` must be the port where the signaling server will be accessible. For example, if you are running the application locally, you can use `9000`. If you are running the application on a server, you can use, for example, `443`
Expand Down

0 comments on commit 6b2a60a

Please sign in to comment.