Files
pocket-chords/docker-compose.yml

47 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
HOST: 0.0.0.0
PORT: 8000
# Comma-separated allowed origins, or * for any.
# Lock this down in production: https://pocketchords.yourdomain.com
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-*}
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