Chore: make some env vars customizable in docker compose

This commit is contained in:
Tahirintsoa Ulrich
2024-10-29 19:05:40 +03:00
parent 978fadd6b9
commit 528cfee1c0

View File

@@ -1,4 +1,4 @@
version: '3'
# version: '3'
services:
docmost:
@@ -7,12 +7,12 @@ services:
- db
- redis
environment:
APP_URL: 'http://localhost:3000'
APP_SECRET: 'REPLACE_WITH_LONG_SECRET'
DATABASE_URL: 'postgresql://docmost:STRONG_DB_PASSWORD@db:5432/docmost?schema=public'
REDIS_URL: 'redis://redis:6379'
APP_URL: ${APP_URL:-http://localhost:3000}
APP_SECRET: ${APP_SECRET}
DATABASE_URL: 'postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public'
REDIS_URL: 'redis://redis:${REDIS_PORT:-6379}'
ports:
- "3000:3000"
- "${PORT:-3000}:3000"
restart: unless-stopped
volumes:
- docmost:/app/data/storage
@@ -20,9 +20,10 @@ services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: docmost
POSTGRES_USER: docmost
POSTGRES_PASSWORD: STRONG_DB_PASSWORD
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_DB: ${POSTGRES_DB:-docmost}
POSTGRES_USER: ${POSTGRES_USER:-root}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-toor}
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data