README: update clone URL to gitea.ledrew.me domain, add seed command
This commit is contained in:
@@ -3,30 +3,44 @@
|
|||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd deploy
|
git clone https://gitea.ledrew.me/ledadmin/project-tracker.git
|
||||||
|
cd project-tracker/deploy
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
App available at `http://<your-server-ip>`
|
App available at `http://<your-server-ip>`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## First Run Notes
|
## First Run Notes
|
||||||
|
|
||||||
- The SQLite database initializes automatically on first start
|
- The SQLite database initializes automatically on first start (empty)
|
||||||
- The database file is persisted in a Docker named volume (`project-tracker-data`)
|
- The database file is persisted in a Docker named volume (`project-tracker-data`)
|
||||||
- To seed with sample projects, exec into the container:
|
- Projects added through the web UI are stored in the database, not in the code
|
||||||
```bash
|
|
||||||
docker exec -it project-tracker-api node -e "
|
---
|
||||||
const db = require('better-sqlite3')('/app/data/projects.db');
|
|
||||||
const items = [
|
## 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:'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:'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:'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'},
|
||||||
const stmt = db.prepare('INSERT INTO projects (name,priority,url,notes,status,owner,tags) VALUES (?,?,?,?,?,?,?)');
|
{name:'Retro ROM Collection Organization',priority:'Low',url:'',notes:'Catalog and organize extensive ROM collection.',status:'Backlog',owner:'Ada',tags:'gaming,retro,emulation'},
|
||||||
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');
|
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
|
## Commands
|
||||||
|
|
||||||
@@ -39,6 +53,8 @@ docker compose down -v # Stop and DELETE database volume (CAREFUL!)
|
|||||||
docker exec -it project-tracker-api sh # Shell into backend container
|
docker exec -it project-tracker-api sh # Shell into backend container
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
@@ -47,12 +63,16 @@ docker exec -it project-tracker-api sh # Shell into backend container
|
|||||||
| `NODE_ENV` | `production` | Node environment |
|
| `NODE_ENV` | `production` | Node environment |
|
||||||
| `DATA_DIR` | `/app/data` | SQLite data directory |
|
| `DATA_DIR` | `/app/data` | SQLite data directory |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Ports
|
## Ports
|
||||||
|
|
||||||
| Port | Service |
|
| Port | Service |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `80` | nginx (frontend + API proxy) |
|
| `80` | nginx (frontend + API proxy) |
|
||||||
| `3000` | Backend API (internal only, not exposed) |
|
| `3000` | Backend API (internal only) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
@@ -60,15 +80,20 @@ docker exec -it project-tracker-api sh # Shell into backend container
|
|||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `project-tracker-data` | `/app/data` | SQLite database file |
|
| `project-tracker-data` | `/app/data` | SQLite database file |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Updating
|
## Updating
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd deploy
|
cd project-tracker
|
||||||
|
git pull
|
||||||
docker compose down
|
docker compose down
|
||||||
docker compose build --no-cache
|
docker compose build --no-cache
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## SSL / HTTPS
|
## 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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user