chore: Fix sample code to remove the deprecated LOM, and add JWT secrets
This commit is contained in:
parent
1cefe64f88
commit
71d53990de
3 changed files with 3 additions and 20 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
1. Copy and change the default password (or username & db name too) from the template file `prod-docker.env`:
|
||||
```bash
|
||||
sed "s/POSTGRES_PASSWORD=hermes/POSTGRES_PASSWORD=$(head -c 500 /dev/random | sha512sum | cut -d " " -f 1)/g" prod-docker.env > .env
|
||||
sed -e "s/POSTGRES_PASSWORD=hermes/POSTGRES_PASSWORD=$(head -c 500 /dev/random | sha512sum | cut -d " " -f 1)/g" -e "s/JWT_SECRET=hermes/JWT_SECRET=$(head -c 500 /dev/random | sha512sum | cut -d " " -f 1)/g" prod-docker.env > .env
|
||||
```
|
||||
|
||||
2. Build the docker stack: `docker compose --env-file .env up -d`
|
||||
|
|
|
@ -6,27 +6,12 @@ services:
|
|||
environment:
|
||||
DATABASE_URL: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@nextnet-postgres:5432/${POSTGRES_DB}?schema=nextnet
|
||||
HERMES_POSTGRES_DSN: postgres://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@nextnet-postgres:5432/${POSTGRES_DB}
|
||||
HERMES_JWT_SECRET: ${JWT_SECRET}
|
||||
HERMES_DATABASE_BACKEND: postgresql
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- 3000:3000
|
||||
|
||||
# WARN: The LOM is deprecated and likely broken currently.
|
||||
#
|
||||
# NOTE: For this to work correctly, the nextnet-api must be version > 0.1.1
|
||||
# or have a version with backported username support, incl. logins
|
||||
lom:
|
||||
image: ghcr.io/imterah/hermes-lom:latest
|
||||
container_name: hermes-lom
|
||||
restart: always
|
||||
ports:
|
||||
- 2222:2222
|
||||
depends_on:
|
||||
- api
|
||||
volumes:
|
||||
- ssh_key_data:/app/keys
|
||||
|
||||
db:
|
||||
image: postgres:17.2
|
||||
container_name: nextnet-postgres
|
||||
|
@ -37,7 +22,6 @@ services:
|
|||
POSTGRES_USER: ${POSTGRES_USERNAME}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
ssh_key_data:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# These are default values, please change these!
|
||||
|
||||
POSTGRES_USERNAME=hermes
|
||||
POSTGRES_PASSWORD=hermes
|
||||
POSTGRES_DB=hermes
|
||||
JWT_SECRET=hermes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue