From 7e0cb80b6be71b9a85a8d12a58005e91c5c58f6d Mon Sep 17 00:00:00 2001 From: Thomas Kendrick Date: Tue, 6 Jan 2026 19:47:13 +0000 Subject: [PATCH] feat: add habitica --- docker-compose.myl | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docker-compose.myl diff --git a/docker-compose.myl b/docker-compose.myl new file mode 100644 index 0000000..1a2b1df --- /dev/null +++ b/docker-compose.myl @@ -0,0 +1,50 @@ +version: "3" +services: + server: + image: docker.io/awinterstein/habitica-server:latest + restart: unless-stopped + depends_on: + - mongo + environment: + - NODE_DB_URI=mongodb://mongo/habitica + - BASE_URL + - INVITE_ONLY # change to `true` after registration of initial users, to restrict further registrations + - EMAIL_SERVER_URL + - EMAIL_SERVER_PORT + - EMAIL_SERVER_AUTH_USER + - EMAIL_SERVER_AUTH_PASSWORD + - ADMIN_EMAIL + networks: + - traefik_public + - habitica + labels: + traefik.http.routers.habitica.rule: "Host(`habitica.${DOMAIN}`)" + traefik.http.routers.habitica.entrypoints: "https" + traefik.http.routers.habitica.tls.certresolver: "cloudflare" + traefik.http.routers.habitica.service: "habitica" + traefik.http.services.habitica.loadbalancer.server.port: "3000" + + mongo: + image: docker.io/mongo:latest # better to replace 'latest' with the concrete mongo version (e.g., the most recent one) + restart: unless-stopped + hostname: mongo + command: ["--replSet", "rs", "--bind_ip_all", "--port", "27017"] + healthcheck: + test: echo "try { rs.status() } catch (err) { rs.initiate() }" | mongosh --port 27017 --quiet + interval: 10s + timeout: 30s + start_period: 0s + start_interval: 1s + retries: 30 + volumes: + - ${CONFIG_ROOT}/habitica/db:/data/db:rw + - ${CONFIG_ROOT}/habitica/dbconf:/data/configdb + networks: + habitica: + aliases: + - mongo +networks: + habitica: + driver: bridge + traefik_public: + external: true