Initial commit: DashCaddy v1.0
Full codebase including API server (32 modules + routes), dashboard frontend, DashCA certificate distribution, installer script, and deployment skills.
This commit is contained in:
23
dashcaddy-installer/templates/Caddyfile.template
Normal file
23
dashcaddy-installer/templates/Caddyfile.template
Normal file
@@ -0,0 +1,23 @@
|
||||
# DashCaddy Caddyfile
|
||||
# Generated by DashCaddy Installer
|
||||
|
||||
# Global options
|
||||
{
|
||||
admin localhost:2019
|
||||
auto_https off
|
||||
}
|
||||
|
||||
# Dashboard
|
||||
:{{PORT}} {
|
||||
root * {{DASHBOARD_PATH}}
|
||||
file_server
|
||||
encode gzip
|
||||
|
||||
# API proxy
|
||||
handle /api/* {
|
||||
reverse_proxy localhost:{{API_PORT}}
|
||||
}
|
||||
|
||||
# SPA fallback
|
||||
try_files {path} /index.html
|
||||
}
|
||||
21
dashcaddy-installer/templates/README.md
Normal file
21
dashcaddy-installer/templates/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# DashCaddy Installer Templates
|
||||
|
||||
This directory contains template files used by the installer to generate configuration files.
|
||||
|
||||
## Templates
|
||||
|
||||
- **Caddyfile.template** - Template for generating Caddyfile configuration
|
||||
- **docker-compose.template.yml** - Template for generating docker-compose.yml
|
||||
|
||||
## Template Variables
|
||||
|
||||
Templates use `{{VARIABLE}}` syntax for variable substitution:
|
||||
|
||||
### Caddyfile.template
|
||||
- `{{PORT}}` - Dashboard port (default: 8080)
|
||||
- `{{DASHBOARD_PATH}}` - Path to dashboard files
|
||||
- `{{API_PORT}}` - API server port (default: 3001)
|
||||
|
||||
### docker-compose.template.yml
|
||||
- `{{API_PATH}}` - Path to API server directory
|
||||
- `{{API_PORT}}` - API server port (default: 3001)
|
||||
21
dashcaddy-installer/templates/docker-compose.template.yml
Normal file
21
dashcaddy-installer/templates/docker-compose.template.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
dashcaddy-api:
|
||||
build: {{API_PATH}}
|
||||
container_name: dashcaddy-api
|
||||
ports:
|
||||
- "{{API_PORT}}:{{API_PORT}}"
|
||||
volumes:
|
||||
- {{API_PATH}}:/app
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT={{API_PORT}}
|
||||
- SERVICES_FILE=/app/services.json
|
||||
- CADDY_ADMIN_URL=http://host.docker.internal:2019
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dashcaddy
|
||||
|
||||
networks:
|
||||
dashcaddy:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user