Skip to main content

[GUIDE] Separate DB

Run Stellaris Cloud with a separate postgres container using docker compose

You might want to run the core application against a separately deployed database.

Create stellariscloud.yml with this content

services:
app:
image: ghcr.io/stellariscloud/stellariscloud:latest
container_name: stellariscloud-demo-app
environment:
APP_HOST_ID: http://stellarisclouddemo.localhost
INITIAL_USER: 'demo'
AUTH_JWT_SECRET: 00000000000000000000000000000000 # replace with a random string
DB_NAME: stellariscloud_demo_db
DB_USER: stellariscloud_demo_user
DB_PASSWORD: demodemodemodemodemodemo
DB_HOST: db
DB_PORT: 5432
LOG_LEVEL: debug
INIT_EVENT_JOBS: true
INSTALL_APPS_ON_START: true
CREATE_DATABASE: true
RUN_MIGRATIONS: true
APPS_LOCAL_PATH: /usr/src/app/apps
DISABLE_EMBEDDED_CORE_APP_WORKER: false
PRINT_CORE_PROCESS_WORKER_OUTPUT: true
ports:
- 8090:80
db:
image: postgres
container_name: stellaris-demo-db
environment:
POSTGRES_DB: stellariscloud_demo_db
POSTGRES_USER: stellariscloud_demo_user
POSTGRES_PASSWORD: demodemodemodemodemodemo
ports:
- 5432:5432

Run (up) the compose file

docker compose -f stellariscloud.yml up