Docker
This commit is contained in:
@@ -115,4 +115,30 @@ Access the dashboard by navigating to `/admin`.
|
||||
|
||||
---
|
||||
|
||||
**Crafted with care by Antigravity.**
|
||||
**Crafted with care by Antigravity.**
|
||||
|
||||
## Docker Deployment with Caddy
|
||||
|
||||
For a self-hosted deployment, this repository now includes:
|
||||
|
||||
- `Dockerfile.frontend`: Builds the Vite frontend and serves it with Caddy.
|
||||
- `server/Dockerfile`: Runs the Node/Express API.
|
||||
- `docker-compose.yml`: Starts Caddy, the API, and PostgreSQL together.
|
||||
- `server/init.sql`: Initializes the database schema on first startup.
|
||||
|
||||
### Quick Start
|
||||
|
||||
1. Copy `.env.example` to `.env`.
|
||||
2. Set `SITE_HOST` to your domain name.
|
||||
3. Set a strong `POSTGRES_PASSWORD`.
|
||||
4. Start the stack:
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
- Caddy terminates TLS automatically when `SITE_HOST` points to a public domain with correct DNS.
|
||||
- The frontend uses `/api` in production, and Caddy proxies that path to the backend container.
|
||||
- PostgreSQL data is stored in the `postgres_data` Docker volume.
|
||||
|
||||
Reference in New Issue
Block a user