I see in the [.env.example](https://github.com/muchdogesec/obstracts/blob/main/.env.example) there are the following settings
POSTGRES_HOST=
POSTGRES_PORT=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=
ARANGODB_HOST_URL=
ARANGODB_USERNAME=
ARANGODB_PASSWORD=
Is there a recommended way to setup Postgres and ArangoDB databases for these variables?
Good question, and this applies to many of our products.
Let me show you the basic settings to get it working, designed for a local (insecure install).
ArangoDB
docker run -e ARANGO_ROOT_PASSWORD=changeme \
-p 8529:8529 \
--name arangodb \
--restart unless-stopped \
-v arango-data:/var/lib/arangodb3 \
-v arango-apps:/var/lib/arangodb3-apps \
arangodb/arangodb:latest
This gives you:
- persistent data
- automatic start after reboot
- automatic restart if the container crashes
In the env file, you can now add
ARANGODB_HOST_URL='http://host.docker.internal:8529'
ARANGODB_USERNAME=root
ARANGODB_PASSWORD=changeme
PostgresSQL
docker run --name postgres \
-e POSTGRES_PASSWORD=changeme \
-p 5432:5432 \
--restart unless-stopped \
-v pgdata:/var/lib/postgresql \
postgres:latest
POSTGRES_HOST='host.docker.internal'
POSTGRES_PORT=5432
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=changeme