name: itsnotes services: itsnotes-db: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_USER: itsnotesuser POSTGRES_PASSWORD: change-this-password POSTGRES_DB: itsnotes volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 5 itsnotes-server: image: ghcr.io/alexmicuplusfour/itsnotes-server:latest restart: unless-stopped depends_on: itsnotes-db: condition: service_healthy environment: NODE_ENV: production PORT: 5000 DB_HOST: itsnotes-db DB_PORT: 5432 DB_USER: itsnotesuser DB_PASSWORD: change-this-password DB_NAME: itsnotes PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium-browser BACKUP_PATH: /app/backups # Markdown Mirror target — exported .md files appear in ./notes-mirror on the host MD_MIRROR_PATH: /data/notes-mirror # Optional — set a fixed auth secret (otherwise auto-generated on first run): # JWT_SECRET: generate-with-openssl-rand-hex-32 # Optional — AI features: # OPENAI_API_KEY: sk-... # Lets the container reach services on the host machine (e.g. Ollama at # http://host.docker.internal:11434). Harmless when unused. extra_hosts: - "host.docker.internal:host-gateway" volumes: - attachments_data:/app/uploads - backups_data:/app/backups # Browsable folder for the Markdown Mirror feature (turn it on in Settings) - ./notes-mirror:/data/notes-mirror itsnotes-client: image: ghcr.io/alexmicuplusfour/itsnotes-client:latest restart: unless-stopped depends_on: - itsnotes-server # Uncomment to serve the app under a path prefix behind your own reverse # proxy (which must strip the prefix), e.g. https://example.com/itsnotes — # see "Serving under a subpath" in the README: # environment: # BASE_PATH: /itsnotes itsnotes-caddy: image: caddy:alpine restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config depends_on: - itsnotes-client volumes: postgres_data: attachments_data: backups_data: caddy_data: caddy_config: