mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 19:21:36 +00:00
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
# documentation: https://hackmd.io/c/codimd-documentation
|
||
# slogan: Realtime collaborative markdown notes on all platforms
|
||
# tags: markdown, md, editor, opensource, collaborative, realtime-collaboration, notes
|
||
# logo: svgs/codimd.png
|
||
# port: 3000
|
||
|
||
services:
|
||
codimd:
|
||
image: "nabo.codimd.dev/hackmdio/hackmd:latest"
|
||
environment:
|
||
# Port setup for Coolify/Traefik
|
||
- SERVICE_FQDN_CODIMD_3000
|
||
- CMD_DOMAIN=$SERVICE_URL_CODIMD
|
||
- CMD_PROTOCOL_USESSL=true
|
||
# This forces the use of https in return urls (for oauth2 ? if used)
|
||
|
||
# Session secret, autogenerated by coolify
|
||
- CMD_SESSION_SECRET=$SERVICE_PASSWORD_SESSIONSECRET
|
||
|
||
# Force resources to be loaded without any external CDN (privacy, security, and isolation)
|
||
- CMD_USECDN=false
|
||
|
||
# DB url
|
||
- "CMD_DB_URL=postgres://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgresql:5432/${POSTGRES_DB:-codimd}"
|
||
|
||
# GitHub Configuration
|
||
# - CMD_GITHUB_CLIENTID=$GITHUB_CLIENTID
|
||
# - CMD_GITHUB_CLIENTSECRET=$GITHUB_CLIENTSECRET
|
||
# If you're planning to use it, uncomment and provide GITHUB_CLIENTID and GITHUB_CLIENTSECRET environment variables
|
||
# I ran into some issues where nothing would happen after login, so you should test it first
|
||
|
||
# Email Configuration
|
||
# https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration#Authentication
|
||
# Warning: CodiMD does *not* verify emails
|
||
- CMD_EMAIL=true
|
||
- CMD_ALLOW_EMAIL_REGISTER=true
|
||
# You're forced to have CMD_ALLOW_EMAIL_REGISTER=true at least once for the first time you create an account
|
||
# However, can be safely disabled afterwards
|
||
# You can also use the manage_users script to create users: https://github.com/hackmdio/codimd/blob/master/bin/manage_users
|
||
# Example: docker exec -t codimd-fgcgkg8gsc8ocww004o0k8g8 node bin/manage_users --add user@example.com
|
||
depends_on:
|
||
postgresql:
|
||
condition: service_healthy
|
||
healthcheck:
|
||
test:
|
||
- CMD-SHELL
|
||
- "curl -f http://localhost:3000/ || exit 1"
|
||
interval: 5s
|
||
timeout: 20s
|
||
retries: 5
|
||
volumes:
|
||
- "upload-data:/home/hackmd/app/public/uploads"
|
||
restart: always
|
||
postgresql:
|
||
image: "postgres:16-alpine"
|
||
volumes:
|
||
- "postgresql-data:/var/lib/postgresql/data"
|
||
environment:
|
||
- POSTGRES_USER=$SERVICE_USER_POSTGRES
|
||
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
||
- "POSTGRES_DB=${POSTGRES_DB:-codimd}"
|
||
healthcheck:
|
||
test:
|
||
- CMD-SHELL
|
||
- "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"
|
||
interval: 5s
|
||
timeout: 20s
|
||
retries: 10
|