93 lines
1.9 KiB
Markdown
93 lines
1.9 KiB
Markdown
# frame-deploy
|
|
|
|
Docker Compose setup for the full Frame stack:
|
|
|
|
- **frame-backend** — Go REST API (auth, users, posts)
|
|
- **frame-cms** — React/Nginx admin frontend
|
|
- **postgres** — PostgreSQL 18
|
|
|
|
---
|
|
|
|
## Quick Start
|
|
|
|
### 1. Clone this repo
|
|
|
|
```bash
|
|
git clone https://git.beatrice.wtf/panic.haus/frame-deploy
|
|
cd frame-deploy
|
|
```
|
|
|
|
### 2. Configure
|
|
|
|
```bash
|
|
cp backend.env.example backend.env
|
|
```
|
|
|
|
Edit `backend.env` and at minimum set:
|
|
|
|
| Variable | What to change |
|
|
|---|---|
|
|
| `DATABASE_URL` | Leave as-is (points to the `postgres` service) |
|
|
| `JWT_SECRET` | **Change this in production** |
|
|
| `CORS_ALLOWED_ORIGINS` | URL where frame-cms will be served |
|
|
| `FRONTEND_BASE_URL` | Same URL (used in email links) |
|
|
| `SMTP_*` | Optional — needed for email verification |
|
|
|
|
`VITE_API_BASE_URL` for frame-cms defaults to `http://localhost:8080`. Override it in `docker-compose.yml` or via env:
|
|
|
|
```bash
|
|
VITE_API_BASE_URL=https://api.example.com docker compose up -d
|
|
```
|
|
|
|
### 3. Pull images and start
|
|
|
|
```bash
|
|
docker compose pull
|
|
docker compose up -d
|
|
```
|
|
|
|
Services will be available at:
|
|
|
|
- **CMS:** http://localhost:3000
|
|
- **API:** http://localhost:8080
|
|
|
|
Ports can be overridden via environment variables before `docker compose up`:
|
|
|
|
```bash
|
|
BACKEND_PORT=9090 CMS_PORT=4000 docker compose up -d
|
|
```
|
|
|
|
### 4. Create an admin user (first time only)
|
|
|
|
If SMTP is not configured, email verification won't work — you'll need to manually verify the user in the DB:
|
|
|
|
```bash
|
|
docker compose exec postgres psql -U postgres -d appdb \
|
|
-c "UPDATE users SET email_verified = true WHERE email = 'your@email.com';"
|
|
```
|
|
|
|
---
|
|
|
|
## Data persistence
|
|
|
|
Postgres data is stored in `./data/postgres/` (relative to this directory).
|
|
This folder is gitignored — back it up separately.
|
|
|
|
---
|
|
|
|
## Updating
|
|
|
|
```bash
|
|
docker compose pull
|
|
docker compose up -d
|
|
```
|
|
|
|
---
|
|
|
|
## Stopping
|
|
|
|
```bash
|
|
docker compose down # stop, keep data
|
|
docker compose down -v # stop + remove volumes (destructive)
|
|
```
|