refactor(service): improve CodiMD
- fix CSS styles not loading on http - make all ENVs configurable - remove comments - formatting and naming
This commit is contained in:
@@ -6,40 +6,18 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
codimd:
|
codimd:
|
||||||
image: "nabo.codimd.dev/hackmdio/hackmd:latest"
|
image: nabo.codimd.dev/hackmdio/hackmd:latest
|
||||||
environment:
|
environment:
|
||||||
# Port setup for Coolify/Traefik
|
|
||||||
- SERVICE_FQDN_CODIMD_3000
|
- SERVICE_FQDN_CODIMD_3000
|
||||||
- CMD_DOMAIN=$SERVICE_URL_CODIMD
|
- CMD_DOMAIN=${SERVICE_URL_CODIMD}
|
||||||
- CMD_PROTOCOL_USESSL=true
|
- CMD_PROTOCOL_USESSL=${CMD_PROTOCOL_USESSL:-false}
|
||||||
# This forces the use of https in return urls (for oauth2 ? if used)
|
- CMD_SESSION_SECRET=${SERVICE_PASSWORD_SESSIONSECRET}
|
||||||
|
- CMD_USECDN=${CMD_USECDN:-false}
|
||||||
# Session secret, autogenerated by coolify
|
- CMD_DB_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-codimd-db}
|
||||||
- CMD_SESSION_SECRET=$SERVICE_PASSWORD_SESSIONSECRET
|
- CMD_EMAIL=${CMD_EMAIL:-true}
|
||||||
|
- CMD_ALLOW_EMAIL_REGISTER=${CMD_ALLOW_EMAIL_REGISTER:-true}
|
||||||
# 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:
|
depends_on:
|
||||||
postgresql:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
@@ -49,16 +27,16 @@ services:
|
|||||||
timeout: 20s
|
timeout: 20s
|
||||||
retries: 5
|
retries: 5
|
||||||
volumes:
|
volumes:
|
||||||
- "upload-data:/home/hackmd/app/public/uploads"
|
- uploads_data:/home/hackmd/app/public/uploads
|
||||||
restart: always
|
|
||||||
postgresql:
|
postgres:
|
||||||
image: "postgres:16-alpine"
|
image: postgres:16-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- "postgresql-data:/var/lib/postgresql/data"
|
- codimd_postgres_data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=$SERVICE_USER_POSTGRES
|
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
|
||||||
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||||
- "POSTGRES_DB=${POSTGRES_DB:-codimd}"
|
- POSTGRES_DB=${POSTGRES_DB:-codimd-db}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
- CMD-SHELL
|
- CMD-SHELL
|
||||||
|
|||||||
Reference in New Issue
Block a user