Files
Nathan Fretz 5100f03689 Fix https sign-in for apps with trusted-origin lists
Trust https:// origins in apps with trusted-origin lists

umbrelOS 2.0 serves app ports over HTTPS too, but these apps only trusted
http:// origins, so CSRF or auth origin checks reject sign-ins and form
submissions when the app is opened with https://.
2026-11-12 11:21:53 +10:00

93 lines
3.2 KiB
YAML

version: "3.7"
services:
app_proxy:
environment:
APP_HOST: miner-sentinel_frontend_1
APP_PORT: 80
db:
image: postgres:17.7@sha256:2006493727bd5277eece187319af1ef82b4cf82cf4fc1ed00da0775b646ac2a4
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
volumes:
- ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: minersentinel
POSTGRES_PASSWORD: minersentinel
POSTGRES_DB: minersentinel
healthcheck:
test: ["CMD-SHELL", "pg_isready -U minersentinel"]
interval: 10s
timeout: 5s
retries: 5
backend:
image: dcbert/minersentinel-backend:v1.2.0@sha256:d2bb7fd12bf2b06705ead137f56f9101e6bfc761bc9bdce2e5fac83e93e9a49e
restart: on-failure
stop_grace_period: 1m
depends_on:
- db
environment:
# Database configuration
POSTGRES_HOST: miner-sentinel_db_1
POSTGRES_PORT: 5432
POSTGRES_DB: minersentinel
POSTGRES_USER: minersentinel
POSTGRES_PASSWORD: minersentinel
# Django settings
DJANGO_SECRET_KEY: ${APP_SEED}
DJANGO_DEBUG: "False"
ALLOWED_HOSTS: "*"
CORS_ALLOWED_ORIGINS: "http://${DEVICE_DOMAIN_NAME}:3082,https://${DEVICE_DOMAIN_NAME}:3082,http://${DEVICE_HOSTNAME}:3082,https://${DEVICE_HOSTNAME}:3082,http://*.ts.net:3082,${APP_MINER_SENTINEL_LOCAL_URLS}"
CSRF_TRUSTED_ORIGINS: "http://${DEVICE_DOMAIN_NAME}:3082,https://${DEVICE_DOMAIN_NAME}:3082,http://${DEVICE_HOSTNAME}:3082,https://${DEVICE_HOSTNAME}:3082,http://*.ts.net:3082,${APP_MINER_SENTINEL_LOCAL_URLS}"
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_PASSWORD: $APP_PASSWORD
DJANGO_SUPERUSER_EMAIL: "admin@umbrel.local"
# API URL for frontend
API_BASE_URL: "http://${DEVICE_DOMAIN_NAME}:3082"
command: >
sh -c "
python manage.py migrate &&
python manage.py collectstatic --noinput &&
(python manage.py createsuperuser --no-input ||
echo 'Superuser already exists or created — winning!') &&
gunicorn minersentinel.wsgi:application --bind 0.0.0.0:8000 --workers 2 --timeout 120
"
frontend:
image: dcbert/minersentinel-frontend:v1.2.0@sha256:f98ece2ebc2fea9fe9cf0b8363fc1e917783c4185cdb3498bbd6a1c495fed074
restart: on-failure
stop_grace_period: 1m
depends_on:
- backend
environment:
VITE_API_URL: "http://${DEVICE_DOMAIN_NAME}:3082"
data-service:
image: dcbert/minersentinel-data-service:v1.2.0@sha256:9fab2cce9d5b0591ca7f14b7b1af078e84cae4edd261d0d4d86d19444e4bf623
restart: on-failure
stop_grace_period: 1m
depends_on:
- db
- backend
environment:
# Database configuration
POSTGRES_HOST: miner-sentinel_db_1
POSTGRES_PORT: 5432
POSTGRES_DB: minersentinel
POSTGRES_USER: minersentinel
POSTGRES_PASSWORD: minersentinel
# Backend API
BACKEND_URL: "http://miner-sentinel_backend_1:8000"
# Polling intervals (in seconds)
BITAXE_POLL_INTERVAL: 60
AVALON_POLL_INTERVAL: 60
POOL_POLL_INTERVAL: 300
# Telegram notifications (optional - configure via Django admin / Settings page)
TELEGRAM_BOT_TOKEN: ""
TELEGRAM_CHAT_ID: ""
# Discord notifications (optional)
DISCORD_WEBHOOK_URL: ""