Note Mark
  • Support The Project
  • Examples

    Shown examples use official Docker images. Examples also show links to download the files, to provide easier deployment.

    Example deployments use insecure credentials, you MUST change them

    You should specify a image tag for a version, DO NOT use latest

    All-In-One

    This example shows how to use the all-in-one image with the built-in SQLite database.

    # file: docker-compose.yml
    # built-for: 0.10.0
    version: "3"
    
    volumes:
      data:
    
    services:
      note-mark:
        image: ghcr.io/enchant97/note-mark-aio
        restart: unless-stopped
        volumes:
          - data:/data
        environment:
          # !!! REPLACE These !!!
          JWT_SECRET: "bXktc2VjcmV0"
          CORS_ORIGINS: "https://example.com:8000"
        ports:
          - 80:8000
    

    PostgreSQL

    This example shows how the backend can be configured using a PostgreSQL database.

    # file: docker-compose.yml
    # built-for: 0.6.0
    version: "3"
    
    volumes:
      backend_data:
      db_data:
    
    services:
      backend:
        image: ghcr.io/enchant97/note-mark-backend
        restart: unless-stopped
        volumes:
          - backend_data:/data
        environment:
          # !!! REPLACE These !!!
          JWT_SECRET: "bXktc2VjcmV0"
          CORS_ORIGINS: "https://example.com:8000"
          DB__TYPE: postgres
          DB__URI: "host=db user=postgres password=postgres dbname=notemark port=5432 sslmode=disable TimeZone=Europe/London"
        ports:
          - 8001:8000
    
      frontend:
        image: ghcr.io/enchant97/note-mark-frontend
        restart: unless-stopped
        ports:
          - 8000:8000
    
      db:
        image: postgres:15-alpine
        restart: unless-stopped
        volumes:
          - db_data:/var/lib/postgresql/data
        environment:
          POSTGRES_DB: notemark
          POSTGRES_USER: postgres
          # !!! REPLACE !!!
          POSTGRES_PASSWORD: postgres
    

    Nginx HTTP

    This example allows you to access both the frontend and backend over the standard HTTP port (80).

    # file: docker-compose.yml
    # built-for: 0.6.0
    version: "3"
    
    volumes:
      data:
    
    services:
      backend:
        image: ghcr.io/enchant97/note-mark-backend
        restart: unless-stopped
        volumes:
          - data:/data
        environment:
          # !!! REPLACE These !!!
          JWT_SECRET: "bXktc2VjcmV0"
          CORS_ORIGINS: "http://example.com"
    
      frontend:
        image: ghcr.io/enchant97/note-mark-frontend
        restart: unless-stopped
    
      proxy:
        image: nginx:alpine
        restart: unless-stopped
        ports:
          - 80:80
        volumes:
          - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    
    # file: nginx.conf
    upstream backend {
        server backend:8000;
    }
    
    upstream frontend {
        server frontend:8000;
    }
    
    server {
        listen 80;
        server_name example.com;
    
        location / {
            proxy_pass http://frontend;
        }
    
        location /api {
            proxy_pass http://backend/api;
        }
    }