mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-20 21:23:41 +03:00
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
153 lines
5.4 KiB
YAML
153 lines
5.4 KiB
YAML
services:
|
|
# Umbrel app proxy - routes external traffic to our nginx
|
|
app_proxy:
|
|
environment:
|
|
APP_HOST: bffless_nginx_1
|
|
APP_PORT: 5537
|
|
PROXY_AUTH_ADD: 'false'
|
|
|
|
# Nginx reverse proxy - serves frontend, routes API calls
|
|
# Uses custom umbrel image with baked-in config template and setup page
|
|
nginx:
|
|
image: ghcr.io/bffless/ce-nginx:umbrel@sha256:e76ceda29c799638ac88eb40ebec0ed2763a0f8750a263d03a27b5c00522b0db
|
|
restart: on-failure
|
|
stop_grace_period: 30s
|
|
environment:
|
|
DEVICE_DOMAIN_NAME: ${DEVICE_DOMAIN_NAME:-umbrel.local}
|
|
volumes:
|
|
# User config (domain.txt) - writable by user
|
|
- ${APP_DATA_DIR}/data/config:/app/config:ro
|
|
# Frontend static files from frontend container
|
|
- ${APP_DATA_DIR}/data/frontend:/usr/share/nginx/html/app:ro
|
|
# Dynamic domain configs written by backend
|
|
- ${APP_DATA_DIR}/data/nginx:/etc/nginx/sites-enabled
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
|
|
# PostgreSQL database
|
|
postgres:
|
|
image: pgvector/pgvector:0.8.2-pg17@sha256:feb68f4f15446397d8cac7f4fe48fe4586de83160d1fc48b46283312d1a33966
|
|
restart: on-failure
|
|
stop_grace_period: 30s
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: staticfilesgobrrrr
|
|
POSTGRES_DB: assethost
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/postgres:/var/lib/postgresql/data
|
|
- ${APP_DATA_DIR}/data/db/init-databases.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
command: >
|
|
postgres
|
|
-c shared_buffers=64MB
|
|
-c effective_cache_size=128MB
|
|
-c work_mem=4MB
|
|
-c maintenance_work_mem=32MB
|
|
-c max_connections=20
|
|
-c wal_buffers=4MB
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# SuperTokens authentication service
|
|
supertokens:
|
|
image: supertokens/supertokens-postgresql:9.3@sha256:39c36693b19c4e231684c9e614422c1c95751c346c6fc3ffd74980161d0b041c
|
|
restart: on-failure
|
|
stop_grace_period: 30s
|
|
# Provide the hostname used by SUPERTOKENS_CONNECTION_URI below. This avoids
|
|
# underscores in the generated container name and service-name collisions with
|
|
# other apps on Umbrel's shared Docker network.
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- bffless-supertokens
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
# Use individual params instead of connection URI (more reliable)
|
|
POSTGRESQL_HOST: bffless_postgres_1
|
|
POSTGRESQL_PORT: '5432'
|
|
POSTGRESQL_USER: postgres
|
|
POSTGRESQL_PASSWORD: staticfilesgobrrrr
|
|
POSTGRESQL_DATABASE_NAME: supertokens
|
|
# Increased memory for JVM startup on ARM64
|
|
JAVA_OPTS: '-Xmx192m -Xms96m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m'
|
|
POSTGRESQL_CONNECTION_POOL_SIZE: '3'
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://localhost:3567/hello']
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 8
|
|
start_period: 45s
|
|
|
|
# NestJS backend API
|
|
# Uses custom umbrel image with baked-in entrypoint that derives keys from APP_SEED
|
|
backend:
|
|
image: ghcr.io/bffless/ce-backend:umbrel@sha256:329c19087c022d4b0085d790ed3b5eca83a86d21ffa96f01ce9547d674f5a1d7
|
|
restart: on-failure
|
|
stop_grace_period: 30s
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
supertokens:
|
|
condition: service_healthy
|
|
environment:
|
|
NODE_OPTIONS: '--max-old-space-size=128'
|
|
NODE_ENV: production
|
|
PORT: '3000'
|
|
LOG_LEVEL: 'error,warn,log'
|
|
# Umbrel provides APP_SEED - entrypoint derives ENCRYPTION_KEY, JWT_SECRET, API_KEY_SALT
|
|
APP_SEED: ${APP_SEED:-}
|
|
APP_DATA_DIR: ${APP_DATA_DIR:-/data}
|
|
# Database
|
|
DATABASE_URL: postgresql://postgres:staticfilesgobrrrr@bffless_postgres_1:5432/assethost
|
|
# Storage - local filesystem (no MinIO)
|
|
STORAGE_TYPE: local
|
|
ENABLE_MINIO: 'false'
|
|
# Cache - in-memory (no Redis)
|
|
CACHE_TYPE: memory
|
|
ENABLE_REDIS: 'false'
|
|
# SuperTokens
|
|
SUPERTOKENS_MODE: local
|
|
SUPERTOKENS_CONNECTION_URI: http://bffless-supertokens:3567
|
|
SUPERTOKENS_API_KEY: ''
|
|
# Default URLs - overridden by entrypoint if domain.txt exists
|
|
PRIMARY_DOMAIN: localhost
|
|
FRONTEND_URL: http://localhost:5537
|
|
API_DOMAIN: http://localhost:5537
|
|
ADMIN_DOMAIN: localhost
|
|
# Cookie settings - overridden by entrypoint for real domains
|
|
COOKIE_SECURE: 'false'
|
|
COOKIE_DOMAIN: 'umbrel.local'
|
|
# Nginx config
|
|
NGINX_SITES_PATH: /etc/nginx/sites-enabled
|
|
NGINX_RELOAD_WAIT_MS: '3000'
|
|
NGINX_LISTEN_PORT: '5537'
|
|
BACKEND_HOST: backend
|
|
# SSL is handled by Cloudflare Tunnel - nginx generates non-SSL configs
|
|
PROXY_MODE: 'cloudflare-tunnel'
|
|
# Feature flags (UI-related)
|
|
FEATURE_WILDCARD_SSL: 'false'
|
|
FEATURE_WILDCARD_SSL_BANNER: 'false'
|
|
FEATURE_DOMAIN_SSL_TOGGLE: 'false'
|
|
volumes:
|
|
# User uploads
|
|
- ${APP_DATA_DIR}/data/uploads:/app/apps/backend/uploads
|
|
# User config (domain.txt)
|
|
- ${APP_DATA_DIR}/data/config:/app/config:ro
|
|
# Dynamic nginx configs written by backend
|
|
- ${APP_DATA_DIR}/data/nginx:/etc/nginx/sites-enabled
|
|
|
|
# React frontend (serves static files)
|
|
frontend:
|
|
image: ghcr.io/bffless/ce-frontend:umbrel@sha256:d961857db9765406311cd6e2934c3a146a10501f45faa8e8c83b9658c8376077
|
|
restart: on-failure
|
|
stop_grace_period: 30s
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/frontend:/app/dist
|
|
depends_on:
|
|
- backend
|