diff --git a/Dockerfile b/Dockerfile index 2b89af7..5359007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ SUPERNOTE_STORAGE_DIR=/data \ SUPERNOTE_CONFIG_DIR=/data/config \ SUPERNOTE_HOST=0.0.0.0 \ - SUPERNOTE_PORT=8080 + SUPERNOTE_PORT=8000 # Create a non-root user RUN groupadd -g 1000 -r supernote && useradd -u 1000 -r -g supernote supernote @@ -32,7 +32,7 @@ RUN mkdir -p /data /data/config && \ # Switch to non-root user USER supernote -EXPOSE 8080 +EXPOSE 8000 VOLUME ["/data"] diff --git a/README.md b/README.md index ede1b3b..3567b35 100644 --- a/README.md +++ b/README.md @@ -55,16 +55,16 @@ supernote serve ```bash # Create the initial admin account -supernote admin user add you@example.com --url http://localhost:8080 +supernote admin user add you@example.com --url http://localhost:8000 # Authenticate your CLI -supernote cloud login you@example.com --url http://localhost:8080 +supernote cloud login you@example.com --url http://localhost:8000 ``` ### 3. Connect Your Device 1. On your Supernote, go to **Settings > Sync > Private Cloud**. -2. Enter your server URL (e.g., `http://192.168.1.5:8080`). +2. Enter your server URL (e.g., `http://192.168.1.5:8000`). 3. Log in with the email and password you created in Step 2. 4. Tap **Sync** to begin processing your notes. @@ -130,13 +130,26 @@ The notebook parser is a fork and slightly lighter dependency version of [supern ### Run with Docker +The pre-built image is published to the GitHub Container Registry: + +```bash +# Pull and run the latest image +docker run -d \ + -p 8000:8000 \ + -p 8001:8001 \ + -v supernote-data:/data \ + -e SUPERNOTE_GEMINI_API_KEY="your-api-key" \ + ghcr.io/allenporter/supernote:latest +``` + +Or build from source: + ```bash -# Build & Run server docker build -t supernote . -docker run -d -p 8080:8080 -v $(pwd)/storage:/storage supernote serve +docker run -d -p 8000:8000 -v supernote-data:/data supernote ``` -See [Server Documentation](https://github.com/allenporter/supernote/blob/main/supernote/server/README.md) for details. +For a full setup with Docker Compose, see [docker-compose.yml](docker-compose.yml). ### Developer API diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..77bbbf5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +--- +services: + supernote: + image: ghcr.io/allenporter/supernote:latest + # Alternatively, build from source: + # build: . + restart: unless-stopped + ports: + - "8000:8000" # Main server + - "8001:8001" # MCP server + volumes: + - supernote-data:/data + environment: + # AI Provider — set one of the following: + SUPERNOTE_GEMINI_API_KEY: "" # Google Gemini API key + # SUPERNOTE_MISTRAL_API_KEY: "" # Mistral AI API key (alternative) + + # Storage & server + SUPERNOTE_STORAGE_DIR: /data + SUPERNOTE_CONFIG_DIR: /data/config + SUPERNOTE_HOST: 0.0.0.0 + SUPERNOTE_PORT: "8000" + SUPERNOTE_MCP_PORT: "8001" + + # Optional: set the public-facing base URL (e.g. behind a reverse proxy) + # SUPERNOTE_BASE_URL: "https://supernote.example.com" + # SUPERNOTE_MCP_BASE_URL: "https://mcp.example.com" + + # Optional: enable user self-registration + # SUPERNOTE_ENABLE_REGISTRATION: "true" + +volumes: + supernote-data: