[GUIDE] Standalone (including db)
Run Lombok in a single container using docker compose
This configuration combines a postgres database, the main backend and a core worker instance running together. It's useful for demonstration or if you don't have a running postgres instance that you want to use.
Create lombok.standalone.yml with this content
services:
app:
image: ghcr.io/lombokapp/lombok-standalone:latest
pull_policy: always
container_name: lombok-standalone-demo-app
environment:
PLATFORM_HOST: lombokdemo.localhost
INITIAL_USER: demo
AUTH_JWT_SECRET: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # replace with a random string
DB_PASSWORD: demodemodemodemodemodemo
DB_NAME: lombok_demo
DB_USER: lombok_demo
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_EMBEDDED_CORE_APP_WORKER_OUTPUT: true
volumes:
- ./postgres-data/:/var/lib/postgresql/data # use this if you want the application state to persist across restarts
ports:
- 8080:8080
- 5436:5432
cap_drop: # everything below and including this line can be replaced by `privileged: true`, but this is a more constrained setup that's recommended for production
- ALL
cap_add:
- SETUID
- SETGID
- SYS_ADMIN
- SYS_CHROOT
- SETPCAP
- CHOWN
- DAC_OVERRIDE
- DAC_READ_SEARCH
- FOWNER
security_opt:
- seccomp=unconfined
userns_mode: host
Run (up) the compose file
docker compose -f lombok.standalone.yml up