Files
ExcaliDash/DOCKER.md
T
Zimeng Xiong 05d472189c New Icon/Logo
2025-11-22 09:45:20 -08:00

2.0 KiB

ExcaliDash Docker Setup

This Docker setup containerizes the ExcaliDash application with a multi-container architecture.

Architecture

  • Frontend: React/Vite app served by Nginx
  • Backend: Express.js API with Socket.IO
  • Database: SQLite (persisted in Docker volume)

Single Port Exposure

The application exposes only port 6767 externally, which serves the frontend. The frontend's Nginx acts as a reverse proxy to route:

  • /api/* requests to the backend container
  • /socket.io/* WebSocket connections to the backend container

All inter-container communication happens on an internal Docker network.

Quick Start

Pull and run the latest multi-platform images:

docker compose -f docker-compose.prod.yml up -d

Option 2: Build Locally

Build and run all services locally:

docker compose up -d --build

Access the application:

http://localhost:6767

Publishing to Docker Hub

Build and Push Multi-Platform Images

The publish-docker.sh script builds images for multiple platforms (amd64, arm64) and pushes them to Docker Hub:

# Build and push with 'latest' tag
./publish-docker.sh

# Build and push with a specific version
./publish-docker.sh v1.0.0

Database

The SQLite database is stored in a Docker volume named backend-data which persists data across container restarts. Database migrations run automatically when the backend container starts.

Environment Variables

Default configuration works out of the box. To customize:

Create .env files in backend/ or frontend/ directories:

Backend .env:

PORT=8000
NODE_ENV=production

Frontend .env:

VITE_API_URL=/api

Port Mapping

  • 6767 (external) → 80 (frontend nginx) → Routes to backend on internal network
  • 8000 (internal only) - Backend API server

Only port 6767 is accessible from outside the Docker network.