This commit is contained in:
nick committed 2026-09-08 03:36:17 +00:00
1 parent 1c70d34cf3
commit 6c10631a6a
14 files changed
+704

No files matched your search

@@ -0,0 +1,101 @@
# Vendored from https://supernote-private-cloud.supernote.com/cloud/docker-compose.yml,
# with two fixes applied:
# - the mariadb service is missing docker-entrypoint-initdb.d mounts in the
# upstream file, so supernotedb.sql would never actually load into a
# fresh database; added below.
# - a second init script (supernote-email-init.sql, rendered by Ansible
# from Infisical-sourced secrets) pre-seeds SMTP settings into
# u_email_config so registration/password-reset emails work without a
# manual trip through the web UI's "Email Settings" dialog.
# supernote-service's DB_HOSTNAME/MYSQL_*/REDIS_* env vars are also inlined
# directly here instead of upstream's separate .dbenv/env_file, since they're
# just ${VAR} substitutions from the same .env used by mariadb/redis.
services:
mariadb:
image: mariadb:10.6.24
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: supernotedb
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: ${TZ:-UTC}
command: --skip-name-resolve --bind-address=0.0.0.0
volumes:
- ./sndata/db_data:/var/lib/mysql
- ./sndata/config/mysql/conf.d:/etc/mysql/conf.d:ro
- ./supernotedb.sql:/docker-entrypoint-initdb.d/00-supernotedb.sql:ro
- ./supernote-email-init.sql:/docker-entrypoint-initdb.d/01-supernote-email-init.sql:ro
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
restart: unless-stopped
redis:
image: redis:7.4.7
container_name: redis
environment:
TZ: ${TZ:-UTC}
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
volumes:
- ./sndata/redis_data:/data
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
notelib:
image: docker.io/supernote/notelib:6.9.3
container_name: notelib
environment:
TZ: ${TZ:-UTC}
volumes:
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
supernote-service:
image: docker.io/supernote/supernote-service:26.06.04
container_name: supernote-service
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "19071:19071"
- "18072:18072"
- "${FRONTEND_PORT:-19072}:8080"
- "${DOMAIN_PORT:-8199}:8080"
environment:
EXTERNAL_PORT_BACKEND: "19071"
EXTERNAL_PORT_FRONTEND: ${FRONTEND_PORT:-19072}
EXTERNAL_PORT_DOMAIN: ${DOMAIN_PORT:-8199}
TZ: ${TZ:-UTC}
DB_HOSTNAME: mariadb
MYSQL_DATABASE: supernotedb
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
volumes:
- ./sndata/recycle:/home/supernote/recycle
- ./supernote_data:/home/supernote/data
- ./sndata/logs/cloud:/home/supernote/cloud/logs
- ./sndata/logs/app:/home/supernote/logs
- ./sndata/logs/web:/var/log/nginx
- ./sndata/convert:/home/supernote/convert
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"