π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Docker optimisations: Prod server or dev server with hmr
Smaug6739d7513c7df999
diff --git a/README.md b/README.mdindex 4f369b77..ad0f6965 100644--- a/README.md+++ b/README.md@@ -46,21 +46,33 @@ Organize, search, and export your notes with an intuitive interface designed forFor local testing and development, you can use Docker to run the entire stack:+**Start a demo server (local production):**+```bashdocker compose up -d --build```+**Start a development server with hot reloading (HMR):**++```bash+docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build+```+**Access points:**+- π **Frontend**: http://localhost:8200-- π **Backend API**: http://localhost:8201+- π **Backend API**: http://localhost:8201- π¦ **MinIO Console**: http://localhost:9001- ποΈ **MySQL**: localhost:3307 (user: `alexandrie`, password: `password`)**To stop:**+```bashdocker compose down```+If you don't have Docker installed, you can follow the manual setup instructions in the [CONTRIBUTING.md](./CONTRIBUTING.md).+## Contributing πThis project has an MIT license. And you are welcome to contribute.diff --git a/docker-compose.dev.yml b/docker-compose.dev.ymlnew file mode 100644index 00000000..4ff78abb--- /dev/null+++ b/docker-compose.dev.yml@@ -0,0 +1,13 @@+services:+ # Alexandrie Frontend+ frontend:+ build:+ context: ./frontend+ dockerfile: Dockerfile.dev+ container_name: alexandrie-frontend+ restart: unless-stopped+ volumes:+ - ./frontend:/app # montage du code local+ - /app/node_modules+ ports:+ - '8200:8200'diff --git a/docker-compose.yml b/docker-compose.ymlindex 32090bda..a99d932f 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -12,11 +12,11 @@ services:volumes:- mysql_data:/var/lib/mysqlports:- - "3307:3306"+ - '3307:3306'networks:- alexandrie-networkhealthcheck:- test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]+ test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']timeout: 10sretries: 5start_period: 30s@@ -33,12 +33,12 @@ services:volumes:- minio_data:/dataports:- - "9000:9000"- - "9001:9001"+ - '9000:9000'+ - '9001:9001'networks:- alexandrie-networkhealthcheck:- test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]+ test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']interval: 30stimeout: 20sretries: 3@@ -55,30 +55,30 @@ services:DATABASE_NAME: alexandrieDATABASE_USER: alexandrieDATABASE_PASSWORD: password-+# Application ConfigurationJWT_SECRET: your-secure-jwt-secret-key-change-this-in-productionDOMAIN_CLIENT: http://localhost:8200COOKIE_DOMAIN: localhost-+# MinIO ConfigurationMINIO_ENDPOINT: minio:9000MINIO_ACCESSKEY: minioadminMINIO_SECRETKEY: minioadminMINIO_BUCKET: alexandrie-+# SMTP Configuration (optional)- SMTP_HOST: ""- SMTP_MAIL: ""- SMTP_PASSWORD: ""-+ SMTP_HOST: ''+ SMTP_MAIL: ''+ SMTP_PASSWORD: ''+# Port ConfigurationPORT: 8201CPWD: /app/- CONFIG_CPWD: ""+ CONFIG_CPWD: ''GIN_MODE: releaseports:- - "8201:8201"+ - '8201:8201'depends_on:mysql:condition: service_healthy@@ -100,7 +100,7 @@ services:VITE_BASE_CDN: http://localhost:9000/alexandrieNUXT_PUBLIC_BASE_URL: http://localhost:8200ports:- - "8200:8200"+ - '8200:8200'depends_on:- backendnetworks:@@ -114,4 +114,4 @@ volumes:mysql_data:driver: localminio_data:- driver: local\ No newline at end of file+ driver: localdiff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.devnew file mode 100644index 00000000..996a3c01--- /dev/null+++ b/frontend/Dockerfile.dev@@ -0,0 +1,38 @@+# Frontend Dockerfile for Alexandrie - Runtime build with build-time config+FROM node:20-alpine++# Install bun+RUN apk add --no-cache curl unzip bash && \+ curl -fsSL https://bun.sh/install | bash && \+ cp /root/.bun/bin/bun /usr/local/bin/bun && \+ chmod +x /usr/local/bin/bun++# Create app user+RUN addgroup -g 1001 -S appgroup && \+ adduser -S appuser -G appgroup -u 1001++WORKDIR /app++# Copy package files and install dependencies as root+COPY package.json bun.lock ./+RUN bun install+++# Switch to app user+USER appuser++# Expose port+EXPOSE 8200++# Health check+HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \+ CMD curl -f http://localhost:8200/ || exit 1++# Runtime environment variables - can be overridden at container startup+ENV NODE_ENV=production+ENV PORT=8200+ENV VITE_BASE_API=""+ENV VITE_BASE_CDN=""+ENV NUXT_PUBLIC_BASE_URL=""++CMD ["bun", "run", "dev"]