99 lines
3.1 KiB
Markdown
99 lines
3.1 KiB
Markdown
# Project Tracker - Docker Compose Deployment
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
git clone https://gitea.ledrew.me/ledadmin/project-tracker.git
|
|
cd project-tracker/deploy
|
|
docker compose up -d --build
|
|
```
|
|
|
|
App available at `http://<your-server-ip>`
|
|
|
|
---
|
|
|
|
## First Run Notes
|
|
|
|
- The SQLite database initializes automatically on first start (empty)
|
|
- The database file is persisted in a Docker named volume (`project-tracker-data`)
|
|
- Projects added through the web UI are stored in the database, not in the code
|
|
|
|
---
|
|
|
|
## Seed Sample Projects
|
|
|
|
To populate with sample projects after first deploy:
|
|
|
|
```bash
|
|
docker exec -it project-tracker-api node -e "
|
|
const db = require('better-sqlite3')('/app/data/projects.db');
|
|
const items = [
|
|
{name:'Bastion setup with Headscale/Tailscale',priority:'Medium',url:'',notes:'Use i3-4130T as hardened jump-box/gateway into homelab.',status:'Active',owner:'Ada',tags:'vpn,homelab,security'},
|
|
{name:'Outline',priority:'Med-High',url:'https://www.getoutline.com/',notes:'Self-hosted knowledge base/wiki (Notion alternative).',status:'Backlog',owner:'Ada',tags:'wiki,notes'},
|
|
{name:'Tinyauth',priority:'Med-High',url:'https://tinyauth.app/',notes:'Self-hosted zero-trust authentication platform.',status:'Backlog',owner:'Ada',tags:'auth,security'},
|
|
{name:'TDarr',priority:'Medium',url:'https://github.com/HaveAGitGat/Tdarr',notes:'Video transcode automation for Plex/Jellyfin.',status:'Backlog',owner:'Ada',tags:'media,transcode'},
|
|
{name:'Retro ROM Collection Organization',priority:'Low',url:'',notes:'Catalog and organize extensive ROM collection.',status:'Backlog',owner:'Ada',tags:'gaming,retro,emulation'},
|
|
];
|
|
const stmt = db.prepare('INSERT INTO projects (name,priority,url,notes,status,owner,tags) VALUES (?,?,?,?,?,?,?)');
|
|
items.forEach(i => stmt.run(i.name,i.priority,i.url,i.notes,i.status,i.owner,i.tags));
|
|
console.log('Seeded', items.length, 'projects');
|
|
"
|
|
```
|
|
|
|
---
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
docker compose up -d --build # Build and start (always use --build to pick up code changes)
|
|
docker compose logs -f # View logs
|
|
docker compose logs -f backend # View backend logs only
|
|
docker compose restart # Restart
|
|
docker compose down # Stop
|
|
docker compose down -v # Stop and DELETE database volume (CAREFUL!)
|
|
docker exec -it project-tracker-api sh # Shell into backend container
|
|
```
|
|
|
|
---
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Default | Description |
|
|
|---|---|---|
|
|
| `PORT` | `3000` | Backend port (internal) |
|
|
| `NODE_ENV` | `production` | Node environment |
|
|
| `DATA_DIR` | `/app/data` | SQLite data directory |
|
|
|
|
---
|
|
|
|
## Ports
|
|
|
|
| Port | Service |
|
|
|---|---|
|
|
| `80` | nginx (frontend + API proxy) |
|
|
| `3000` | Backend API (internal only) |
|
|
|
|
---
|
|
|
|
## Volumes
|
|
|
|
| Volume | Mount | Description |
|
|
|---|---|---|
|
|
| `project-tracker-data` | `/app/data` | SQLite database file |
|
|
|
|
---
|
|
|
|
## Updating
|
|
|
|
```bash
|
|
git pull
|
|
docker compose down
|
|
docker compose up -d --build
|
|
```
|
|
|
|
---
|
|
|
|
## SSL / HTTPS
|
|
|
|
For HTTPS, put nginx behind a reverse proxy (e.g., NginxProxyManager, Traefik, Caddy) on port 80/443. The nginx container should NOT be exposed directly to the internet.
|