added docker files and compose

This commit is contained in:
Honey committed 2026-02-17 21:09:58 +01:00
1 parent 4709096ab3
commit 443184a6fa
5 files changed
+694 -1150

No files matched your search

+17 -30
View File
@@ -1,57 +1,44 @@
version: "3.8"
# ─────────────────────────────────────────────
# InkNote — Deploy on Docker VM
# Pull images from Gitea container registry
#
# Usage:
# docker login gitea.honeyy.duckdns.org
# docker-compose pull
# docker-compose up -d
# ─────────────────────────────────────────────
services:
# ─── Backend API + WebSocket Server ───
inknote-server:
build:
context: ./backend
dockerfile: Dockerfile
image: gitea.honeyy.duckdns.org/marc/inknote-server:latest # ← Change 'marc' to your Gitea username
container_name: inknote-server
restart: unless-stopped
ports:
- "4000:4000"
environment:
- PORT=4000
- JWT_SECRET=${JWT_SECRET:-please-change-this-secret-key}
- JWT_SECRET=${JWT_SECRET}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- NODE_ENV=production
volumes:
- inknote-data:/app/data
- inknote-uploads:/app/uploads
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/api/health"]
test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"]
interval: 30s
timeout: 5s
retries: 3
# ─── Frontend (Production Build) ───
inknote-web:
build:
context: ./frontend
dockerfile: Dockerfile
image: gitea.honeyy.duckdns.org/marc/inknote-web:latest # ← Change 'marc' to your Gitea username
container_name: inknote-web
restart: unless-stopped
ports:
- "3000:80"
depends_on:
- inknote-server
# ─── Optional: PostgreSQL for production ───
# Uncomment to use PostgreSQL instead of SQLite
# inknote-db:
# image: postgres:16-alpine
# container_name: inknote-db
# restart: unless-stopped
# environment:
# POSTGRES_DB: inknote
# POSTGRES_USER: inknote
# POSTGRES_PASSWORD: ${DB_PASSWORD:-change-me}
# volumes:
# - postgres-data:/var/lib/postgresql/data
# ports:
# - "5432:5432"
inknote-server:
condition: service_healthy
volumes:
inknote-data:
inknote-uploads:
# postgres-data:
inknote-uploads: