This project can run fully in Docker with three services:
app(SvelteKit + Bun)postgres(postgres:18-alpine)redis(redis:latest)
- Linux server (Ubuntu/Debian recommended)
- Docker Engine + Docker Compose plugin (
docker compose) - Open ports:
5173for the app5432only if you need external DB access6379only if you need external Redis access
Choose one method.
git clone <YOUR_REPO_URL> mesa
cd mesarsync -avz --exclude node_modules --exclude .svelte-kit --exclude dist ./ user@your-server:/opt/mesa
ssh user@your-server
cd /opt/mesaCreate .env from example and update values.
cp .env.example .envMinimum values:
POSTGRES_DB="mesa"
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="change-this-password"
DATABASE_URL="postgres://postgres:change-this-password@localhost:5432/mesa"
REDIS_URL="redis://localhost:6379"Notes:
- In
docker-compose.yml, the app internally usespostgresandredisservice names. POSTGRES_*values in.envare used by both database container and app container wiring.
docker compose up -d --buildCheck status:
docker compose psView logs:
docker compose logs -f app
docker compose logs -f postgres
docker compose logs -f redisRun once on first deployment:
docker compose exec app bun run db:pushOptional seed:
docker compose exec app bun run db:seedIf seed fails with duplicate user errors, data may already be seeded.
Open:
http://<SERVER_IP>:5173
When you push new code:
cd /opt/mesa
git pull
docker compose up -d --build
docker compose exec app bun run db:pushRestart all services:
docker compose restartStop all services:
docker compose downStop and remove volumes (DANGER: deletes DB data):
docker compose down -vOpen PostgreSQL shell:
docker compose exec postgres psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"- Use a strong
POSTGRES_PASSWORD. - Put the app behind a reverse proxy (Nginx/Caddy) with HTTPS.
- Restrict
5432and6379in firewall rules if not needed externally. - Set up backups for
postgres_datavolume. - Use image tag pinning for predictable deployments.
The current app service is dev-friendly because it uses a bind mount and runs bun run dev.
For production, this works but is not optimal.
If you want, we can add a production compose profile (docker-compose.prod.yml) with:
- no source bind mount
- prebuilt app image
bun run build+bun run preview(or adapter-specific runtime)- tighter resource and security settings