Cleanup
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
# Backend
|
|
||||||
API_BASE_URL=http://localhost:3000/api/v1
|
|
||||||
APP_NAME=Caddy Manager
|
|
||||||
DARK_MODE=true
|
|
||||||
# Frontend
|
|
||||||
PORT=3000
|
|
||||||
# Database Engine Configuration
|
|
||||||
DB_ENGINE=sqlite # Options: 'sqlite' or 'mongodb'
|
|
||||||
# SQLite Configuration (used when DB_ENGINE=sqlite)
|
|
||||||
SQLITE_DB_PATH=./caddymanager.sqlite
|
|
||||||
# MongoDB Configuration (used when DB_ENGINE=mongodb)
|
|
||||||
MONGO_USERNAME=mongoadmin
|
|
||||||
MONGO_PASSWORD=QaG33feoWfL2W7F9AuRYTS2N4Bm94hEA
|
|
||||||
MONGODB_URI=mongodb://mongoadmin:QaG33feoWfL2W7F9AuRYTS2N4Bm94hEA@localhost:27017/caddymanager?authSource=admin
|
|
||||||
CORS_ORIGIN=http://localhost:5173
|
|
||||||
LOG_LEVEL=debug
|
|
||||||
CADDY_SANDBOX_URL=http://localhost:2019
|
|
||||||
PING_INTERVAL=30000
|
|
||||||
PING_TIMEOUT=2000
|
|
||||||
AUDIT_LOG_MAX_SIZE_MB=100
|
|
||||||
AUDIT_LOG_RETENTION_DAYS=90
|
|
||||||
JWT_SECRET=YPKCVW8qEEshVN6BHPb6tq4YdhQpdQrR
|
|
||||||
JWT_EXPIRATION=24h
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
# bob
|
|
||||||
# https://github.com/caddymanager
|
|
||||||
---
|
|
||||||
name: caddymanager
|
|
||||||
|
|
||||||
networks:
|
|
||||||
caddymanager:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mongodb_data: # Only used when MongoDB profile is active
|
|
||||||
sqlite_data: # SQLite database storage
|
|
||||||
|
|
||||||
services:
|
|
||||||
# MongoDB database for persistent storage (optional - SQLite is used by default)
|
|
||||||
mongodb:
|
|
||||||
image: mongo:8.0
|
|
||||||
container_name: caddymanager-mongodb
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME:-mongoadmin}
|
|
||||||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD:-someSecretPassword} # Change for production!
|
|
||||||
ports:
|
|
||||||
- "27017:27017" # Expose for local dev, remove for production
|
|
||||||
volumes:
|
|
||||||
- mongodb_data:/data/db
|
|
||||||
networks:
|
|
||||||
- caddymanager
|
|
||||||
profiles:
|
|
||||||
- mongodb # Use 'docker-compose --profile mongodb up' to include MongoDB
|
|
||||||
|
|
||||||
# Backend API server
|
|
||||||
backend:
|
|
||||||
image: caddymanager/caddymanager-backend:latest
|
|
||||||
container_name: caddymanager-backend
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- PORT=3000
|
|
||||||
# Database Engine Configuration (defaults to SQLite)
|
|
||||||
- DB_ENGINE=sqlite # Options: 'sqlite' or 'mongodb'
|
|
||||||
# SQLite Configuration (used when DB_ENGINE=sqlite)
|
|
||||||
- SQLITE_DB_PATH=/app/data/caddymanager.sqlite
|
|
||||||
# MongoDB Configuration (used when DB_ENGINE=mongodb)
|
|
||||||
- MONGODB_URI=mongodb://$${MONGO_USERNAME:-mongoadmin}:$${MONGO_PASSWORD:-someSecretPassword}@mongodb:27017/caddymanager?authSource=admin
|
|
||||||
- CORS_ORIGIN=http://localhost:80
|
|
||||||
- LOG_LEVEL=debug
|
|
||||||
- CADDY_SANDBOX_URL=http://localhost:2019
|
|
||||||
- PING_INTERVAL=30000
|
|
||||||
- PING_TIMEOUT=2000
|
|
||||||
- AUDIT_LOG_MAX_SIZE_MB=100
|
|
||||||
- AUDIT_LOG_RETENTION_DAYS=90
|
|
||||||
- METRICS_HISTORY_MAX=1000 # Optional: max number of in-memory metric history snapshots to keep
|
|
||||||
- JWT_SECRET=YPKCVW8qEEshVN6BHPb6tq4YdhQpdQrR
|
|
||||||
- JWT_EXPIRATION=24h
|
|
||||||
# Backend is now only accessible through frontend proxy
|
|
||||||
volumes:
|
|
||||||
- sqlite_data:/app/data # SQLite database storage
|
|
||||||
networks:
|
|
||||||
- caddymanager
|
|
||||||
|
|
||||||
# Frontend web UI
|
|
||||||
frontend:
|
|
||||||
image: caddymanager/caddymanager-frontend:latest
|
|
||||||
container_name: caddymanager-frontend
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- backend
|
|
||||||
environment:
|
|
||||||
- BACKEND_HOST=backend:3000
|
|
||||||
- APP_NAME=Caddy Manager
|
|
||||||
- DARK_MODE=true
|
|
||||||
ports:
|
|
||||||
# - "80:80" # Expose web UI
|
|
||||||
- 20125:80
|
|
||||||
networks:
|
|
||||||
- caddymanager
|
|
||||||
|
|
||||||
# Notes:
|
|
||||||
# - SQLite is the default database engine - no additional setup required!
|
|
||||||
# - To use MongoDB instead, set DB_ENGINE=mongodb and start with: docker-compose --profile mongodb up
|
|
||||||
# - For production, use strong passwords and consider secrets management.
|
|
||||||
# - The backend uses SQLite by default, storing data in a persistent volume.
|
|
||||||
# - The frontend proxies all /api/* requests to the backend service.
|
|
||||||
# - Backend is not directly exposed - all API access goes through the frontend proxy.
|
|
||||||
@@ -18,12 +18,13 @@ services:
|
|||||||
driver: ${COMPOSE_LOGGING_DRIVER:-local}
|
driver: ${COMPOSE_LOGGING_DRIVER:-local}
|
||||||
# ports:
|
# ports:
|
||||||
# - 27017:27017
|
# - 27017:27017
|
||||||
|
env_file: ./compose.env
|
||||||
volumes:
|
volumes:
|
||||||
- mongo-data:/data/db
|
- mongo-data:/data/db
|
||||||
- mongo-config:/data/configdb
|
- mongo-config:/data/configdb
|
||||||
environment:
|
environment:
|
||||||
MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME}
|
MONGO_INITDB_ROOT_USERNAME: ${KOMODO_DB_USERNAME:-admin}
|
||||||
MONGO_INITDB_ROOT_PASSWORD: ${KOMODO_DB_PASSWORD}
|
MONGO_INITDB_ROOT_PASSWORD: ${KOMODO_DB_PASSWORD:-j6QZCeVcA9tQHND4}
|
||||||
|
|
||||||
core:
|
core:
|
||||||
image: ghcr.io/moghtech/komodo-core:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
|
image: ghcr.io/moghtech/komodo-core:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
|
||||||
@@ -39,8 +40,8 @@ services:
|
|||||||
env_file: ./compose.env
|
env_file: ./compose.env
|
||||||
environment:
|
environment:
|
||||||
KOMODO_DATABASE_ADDRESS: mongo:27017
|
KOMODO_DATABASE_ADDRESS: mongo:27017
|
||||||
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME}
|
KOMODO_DATABASE_USERNAME: ${KOMODO_DB_USERNAME:-admin}
|
||||||
KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD}
|
KOMODO_DATABASE_PASSWORD: ${KOMODO_DB_PASSWORD:-j6QZCeVcA9tQHND4}
|
||||||
volumes:
|
volumes:
|
||||||
## Core cache for repos for latest commit hash / contents
|
## Core cache for repos for latest commit hash / contents
|
||||||
- repo-cache:/repo-cache
|
- repo-cache:/repo-cache
|
||||||
|
|||||||
Reference in New Issue
Block a user