diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6037c80 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +services: + dashboard: + image: nginx:alpine + container_name: damascus-dashboard + volumes: + - ./dist:/usr/share/nginx/html:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + networks: + - litellm_hermes-net + extra_hosts: + - "host.docker.internal:172.19.0.1" + labels: + - "traefik.enable=true" + - "traefik.http.routers.damascus-dashboard.rule=Host(`dashboard.damascusfront.net`)" + - "traefik.http.routers.damascus-dashboard.entrypoints=websecure" + - "traefik.http.routers.damascus-dashboard.tls.certresolver=cloudflare" + - "traefik.http.services.damascus-dashboard.loadbalancer.server.port=80" + restart: unless-stopped + +networks: + litellm_hermes-net: + external: true diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..0c8cd1a --- /dev/null +++ b/nginx.conf @@ -0,0 +1,21 @@ +server { + listen 80; + server_name dashboard.hermes.damascusfront.net; + + # Static files + root /usr/share/nginx/html; + index index.html; + + # SPA fallback + location / { + try_files $uri $uri/ /index.html; + } + + # Proxy API calls to v3 API server on host + location /api/ { + proxy_pass http://host.docker.internal:5170/; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } +}