mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2026-11-22 22:02:29 +03:00
Co-authored-by: Kai Chappel <kaichappel@users.noreply.github.com>
45 lines
1.9 KiB
YAML
45 lines
1.9 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
app_proxy:
|
|
environment:
|
|
APP_HOST: habitica_server_1
|
|
APP_PORT: 3000
|
|
|
|
server:
|
|
image: awinterstein/habitica-server:5.48.2@sha256:6906ac6cd13d652c5c0dbec5c12b2ab74acdf593ecb6fcadbd8eab7e219687cd
|
|
restart: on-failure
|
|
# Habitica enables Helmet's upgrade-insecure-requests CSP directive in production.
|
|
# Umbrel apps are commonly served over local/proxied HTTP, with HTTPS handled externally when exposed.
|
|
# Remove only this directive so those proxied routes work while keeping Habitica's production behavior.
|
|
command: >-
|
|
sh -c "perl -0pi -e 's/upgradeInsecureRequests: IS_PROD \\? \\[\\] : null,?/upgradeInsecureRequests: null/g' /var/lib/habitica/website/server/middlewares/index.js /var/lib/habitica/website/transpiled-babel/middlewares/index.js && printenv | grep -v 'no_proxy' >> /etc/environment && /etc/init.d/cron start && node /var/lib/habitica/website/transpiled-babel/index.js"
|
|
depends_on:
|
|
- mongo
|
|
environment:
|
|
- NODE_DB_URI=mongodb://habitica_mongo_1/habitica
|
|
- BASE_URL=http://${DEVICE_DOMAIN_NAME}:3944
|
|
- INVITE_ONLY=false
|
|
# EMAIL_SERVER_URL=mail.example.com
|
|
# EMAIL_SERVER_PORT=587
|
|
# EMAIL_SERVER_AUTH_USER=mail_user
|
|
# EMAIL_SERVER_AUTH_PASSWORD=mail_password
|
|
# ADMIN_EMAIL=mail@example.com
|
|
|
|
mongo:
|
|
image: mongo:8.0.11@sha256:5941949d3887e40be5175787aade07dc052f2cddb8ce21b740c3948eba6a3ed0
|
|
restart: on-failure
|
|
command: ["--replSet", "rs", "--bind_ip_all", "--port", "27017"]
|
|
healthcheck:
|
|
test: >
|
|
echo "try { rs.status() } catch (err) { rs.initiate({ _id: 'rs', members: [{ _id: 0, host: 'habitica_mongo_1:27017' }] }) }"
|
|
| mongosh --port 27017 --quiet
|
|
interval: 10s
|
|
timeout: 30s
|
|
start_period: 0s
|
|
start_interval: 1s
|
|
retries: 30
|
|
volumes:
|
|
- ${APP_DATA_DIR}/data/db:/data/db:rw
|
|
- ${APP_DATA_DIR}/data/dbconf:/data/configdb
|