No description
- Elixir 75.6%
- HTML 20.6%
- JavaScript 3.3%
- Dockerfile 0.4%
|
All checks were successful
Build and Push OCI Image / build (push) Successful in 2m38s
|
||
|---|---|---|
| .forgejo/workflows | ||
| assets | ||
| config | ||
| lib | ||
| priv | ||
| rel/overlays/bin | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .formatter.exs | ||
| .gitignore | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
Flameview
Video-sharing platform built with Phoenix LiveView. Deploy on any Podman or Docker host.
Prerequisites
- Podman (or Docker) with
podman-compose(ordocker-compose) - A domain / hostname pointing to your server
Quick start
# 1. Clone the repo
git clone <repo-url> && cd flameview
# 2. Create environment file
cp .env.example .env
Edit .env — at minimum set SECRET_KEY_BASE and PHX_HOST:
SECRET_KEY_BASE=your-secret-here # run: mix phx.gen.secret
PHX_HOST=flameview.example.com
Optional settings:
| Variable | Default | Description |
|---|---|---|
LOCK_NEW_USERS |
false |
Lock new users until an admin unlocks them |
VERIFY_EMAIL |
false |
Require email verification on registration |
SMTP_SERVER |
— | SMTP relay hostname (enables email sending) |
SMTP_PORT |
587 |
SMTP port |
SMTP_USER |
— | SMTP username |
SMTP_PASSWORD |
— | SMTP password |
SMTP_SENDER |
noreply@example.com |
From-address for outgoing emails |
POSTGRES_USER |
postgres |
PostgreSQL user |
POSTGRES_PASSWORD |
postgres |
PostgreSQL password |
POSTGRES_DB |
flameview_prod |
PostgreSQL database name |
DATABASE_URL |
auto-built from above | Full Ecto connection string |
# 3. Build and start
podman-compose up -d
# 4. Create and migrate the database
podman-compose exec app release/bin/migrate
# 5. Open http://<your-host>:4000
Production deployment
Build the image
podman build -t flameview:latest .
Without compose (plain Podman)
# Create persistent volumes
podman volume create flameview-pgdata
podman volume create flameview-uploads
podman volume create flameview-thumbnails
# Start PostgreSQL
podman run -d --name flameview-db \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=flameview_prod \
-v flameview-pgdata:/var/lib/postgresql/data \
docker.io/postgres:17
# Wait for DB to be ready, then run migrations
podman run --rm \
--network host \
--env-file .env \
flameview:latest \
release/bin/migrate
# Start the app
podman run -d --name flameview \
--network host \
--env-file .env \
-v flameview-uploads:/app/release/priv/static/uploads \
-v flameview-thumbnails:/app/release/priv/static/thumbnails \
flameview:latest
Reverse proxy (recommended)
Use Caddy, nginx, or Traefik to terminate TLS and proxy to http://localhost:4000.
Example Caddyfile:
flameview.example.com {
reverse_proxy localhost:4000
}
Updating
git pull
podman build -t flameview:latest .
podman-compose up -d # recreate with new image
podman-compose exec app release/bin/migrate # run any new migrations
Backups
# Database
podman exec flameview-db-1 pg_dump -U postgres flameview_prod > backup.sql
# Uploaded files
podman volume backup flameview-uploads -o backup-uploads.tar
Architecture
flameview.example.com:443
│
[reverse proxy]
│
:4000 ─── app (Phoenix LiveView)
│
[PostgreSQL 17]
- Uploads: persisted in Docker volumes
uploads/thumbnails - Database: PostgreSQL 17 in a container with named volume
- Release: Phoenix release (self-contained Elixir/Erlang runtime, no Mix needed)
- Video processing: uses
ffmpegincluded in the runtime image for thumbnail generation