42 lines
1010 B
YAML
42 lines
1010 B
YAML
# PocketChords – homeserver deployment template
|
||
#
|
||
# Usage:
|
||
# cp .env.compose .env.compose.local # fill in your values
|
||
# docker compose --env-file .env.compose.local up -d --build
|
||
#
|
||
# VITE_API_URL is baked into the JS bundle at build time.
|
||
# Set it to the URL your BROWSER (and SSR server) will use to reach the API.
|
||
# On a LAN homeserver: http://192.168.x.x:8000
|
||
# Behind a reverse proxy: https://pocketchords.example.com/api
|
||
|
||
services:
|
||
api:
|
||
build:
|
||
context: .
|
||
dockerfile: Dockerfile
|
||
restart: unless-stopped
|
||
ports:
|
||
- "${API_PORT:-8000}:8000"
|
||
environment:
|
||
DATABASE_URL: sqlite:///app/data/pocket-chords.db
|
||
volumes:
|
||
- api-data:/app/data
|
||
|
||
app:
|
||
build:
|
||
context: ./app
|
||
dockerfile: Dockerfile
|
||
args:
|
||
VITE_API_URL: ${VITE_API_URL:-http://localhost:8000}
|
||
restart: unless-stopped
|
||
ports:
|
||
- "${APP_PORT:-3000}:3000"
|
||
environment:
|
||
PORT: 3000
|
||
depends_on:
|
||
- api
|
||
|
||
volumes:
|
||
api-data:
|
||
driver: local
|