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 # Optional — local AI with Ollama (Settings → AI → Provider → Ollama, Base # URL http://ollama:11434). Uncomment to run Ollama alongside itsnotes; # skip this and use host.docker.internal:11434 if Ollama already runs on # the host. # ollama: # image: ollama/ollama:latest # restart: unless-stopped # volumes: # - ollama_data:/root/.ollama 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 ports: - "80:80" volumes: postgres_data: attachments_data: backups_data: # Uncomment together with the ollama service above: # ollama_data: