Docker Compose Variables
Docker Compose Example File docker-compose.ymlโ
services:
db:
image: postgres:16-alpine
restart: always
networks:
- boards-network
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: 4gaBoards
POSTGRES_PASSWORD: notpassword
POSTGRES_INITDB_ARGS: "-A scram-sha-256"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d 4gaBoards"]
interval: 1s
timeout: 5s
retries: 50
4gaBoards:
image: ghcr.io/rargames/4gaboards:latest
restart: always
networks:
- boards-network
volumes:
- user-avatars:/app/public/user-avatars
- project-background-images:/app/public/project-background-images
- attachments:/app/private/attachments
ports:
- 3000:1337
environment:
BASE_URL: http://localhost:3000
SECRET_KEY: notsecretkey
DATABASE_URL: postgresql://postgres:notpassword@db/4gaBoards
NODE_ENV: production
## Add optional 4ga Boards instance variables here
depends_on:
db:
condition: service_healthy
volumes:
user-avatars:
project-background-images:
attachments:
db-data:
networks:
boards-network:
4ga Boards - Required Instance Variablesโ
db service environment variables:
POSTGRES_DB- database namePOSTGRES_PASSWORD- database password
4gaBoards service environment variables:
BASE_URL- domain or ip address used to access 4ga BoardsDATABASE_URL- database url in the following format:postgresql://<username>:<password>@<host>/<database_name>SECRET_KEY- session secret key
4ga Boards - Optional Instance Variablesโ
4gaBoards service environment variables:
Default settings (applied only on first run)โ
Default admin user is always created, but you can override the default values:โ
DEFAULT_ADMIN_USERNAME: "demo"- default admin username, defaults todemoDEFAULT_ADMIN_EMAIL: "demo@demo.demo"- default admin email, defaults todemo@demo.demoDEFAULT_ADMIN_NAME: "Demo Demo"- default admin name, defaults toDemo DemoDEFAULT_ADMIN_PASSWORD: "demo"- default admin password, defaults todemo
Other settings:โ
DEFAULT_PROJECT_CREATION_ALL: true- only admins can create projects if true, defaults totrueDEFAULT_REGISTRATION_ENABLED: true- registration enabled if true, defaults totrueDEFAULT_LOCAL_REGISTRATION_ENABLED: true- local registration emabled if true, defaults totrueDEFAULT_SSO_REGISTRATION_ENABLED: true- sso registration enabled if true, defaults totrue
Google OAuth2.0โ
GOOGLE_CLIENT_ID: googleClientId- client id from the project on: https://console.cloud.google.com/GOOGLE_CLIENT_SECRET: googleClientSecret- client secret from the project: generated in app settings
GitHub OAuth2.0โ
GITHUB_CLIENT_ID: githubClientId- client id from the app after creating on: https://github.com/settings/applications/new or https://github.com/settings/apps/newGITHUB_CLIENT_SECRET: githubClientSecret- client secret from the app: generated in app settings
Microsoft OIDCโ
MICROSOFT_CLIENT_ID: microsoftClientId- client id from the app after creating on: https://portal.azure.com/MICROSOFT_CLIENT_SECRET: microsoftClientSecret- client secret from the app: generated in app settings
Other settingsโ
CLIENT_URL: http://localhost:3000- main client URL - usually not needed, if running production defaults toBASE_URL, if development defaults tohttp://localhost:3000(skip this unless you really need it)DEMO_MODE: false- demo mode enabled if true, defaults tofalseLOG_LEVEL: warn- log levels from highest to lowest - error, warn, info, http, verbose, debug, silly, defaults towarnTRUST_PROXY: 0- trust proxy used only if 4ga Boards are behind a proxy/load balancer, defaults to0TOKEN_EXPIRES_IN: 365- token expiration in days, defaults to365
Additional Links:
4ga Boards docker-compose.yml File
4ga Boards Professional Hosting