Update docker-compose.yml
This commit is contained in:
+28
-35
@@ -1,17 +1,12 @@
|
|||||||
# Yote-In-Vest behind an existing Traefik (v2 or v3).
|
# Yote-In-Vest behind Traefik v3 + Authentik
|
||||||
#
|
# - Dashboard: https://${BOT_DOMAIN} -> requires Authentik login (authentik@docker)
|
||||||
# Two routes on the same domain:
|
# - Webhook: https://${BOT_DOMAIN}/webhook -> open for TradingView, protected by WEBHOOK_SECRET
|
||||||
# /webhook -> open, so TradingView can reach it (protected by WEBHOOK_SECRET)
|
# Requires the external `proxy` network.
|
||||||
# all else -> dashboard, protected by basic auth (DASHBOARD_AUTH)
|
|
||||||
#
|
|
||||||
# Settings come from environment variables (in Portainer: Stack > Environment variables).
|
|
||||||
# No .env file is needed. Required: WEBHOOK_SECRET and DASHBOARD_AUTH. Everything else has a
|
|
||||||
# default. Adjust TRAEFIK_NETWORK / TRAEFIK_ENTRYPOINT / TRAEFIK_CERTRESOLVER if your Traefik differs.
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
yote-in-vest:
|
yote-in-vest:
|
||||||
build: .
|
build: .
|
||||||
pull_policy: build # always build from this folder; never try to pull from a registry
|
pull_policy: build
|
||||||
container_name: yote-in-vest
|
container_name: yote-in-vest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -42,37 +37,35 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- yote-in-vest-data:/data
|
- yote-in-vest-data:/data
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- proxy
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
traefik.enable: "true"
|
||||||
- traefik.docker.network=${TRAEFIK_NETWORK:-traefik}
|
traefik.docker.network: proxy
|
||||||
- traefik.http.services.yote-in-vest.loadbalancer.server.port=8000
|
traefik.http.services.yote-in-vest.loadbalancer.server.port: "8000"
|
||||||
|
|
||||||
# Webhook: no password, TradingView can't send one.
|
# Webhook: no Authentik (TradingView can't log in); WEBHOOK_SECRET protects it
|
||||||
- traefik.http.routers.yote-in-vest-webhook.rule=Host(`${BOT_DOMAIN:-yoteinvest.dv3.app}`) && Path(`/webhook`)
|
traefik.http.routers.yote-in-vest-webhook.rule: Host(`${BOT_DOMAIN:-yoteinvest.dv3.app}`) && Path(`/webhook`)
|
||||||
- traefik.http.routers.yote-in-vest-webhook.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}
|
traefik.http.routers.yote-in-vest-webhook.entrypoints: websecure
|
||||||
- traefik.http.routers.yote-in-vest-webhook.tls.certresolver=${TRAEFIK_CERTRESOLVER:-letsencrypt}
|
traefik.http.routers.yote-in-vest-webhook.tls.certresolver: letsencrypt
|
||||||
- traefik.http.routers.yote-in-vest-webhook.priority=100
|
traefik.http.routers.yote-in-vest-webhook.priority: "100"
|
||||||
- traefik.http.routers.yote-in-vest-webhook.service=yote-in-vest
|
traefik.http.routers.yote-in-vest-webhook.service: yote-in-vest
|
||||||
# Optional extra lock: only accept TradingView's sending IPs.
|
# Optional: only accept webhooks from TradingView's IPs
|
||||||
# Check the current list on TradingView's "How to configure webhook alerts" help page,
|
# traefik.http.middlewares.yote-in-vest-tv-ips.ipallowlist.sourcerange: 52.89.214.238,34.212.75.30,54.218.53.128,52.32.178.7
|
||||||
# then uncomment both lines (v3 uses ipallowlist, v2 uses ipwhitelist):
|
# traefik.http.routers.yote-in-vest-webhook.middlewares: yote-in-vest-tv-ips
|
||||||
# - traefik.http.middlewares.yote-in-vest-tv-ips.ipallowlist.sourcerange=52.89.214.238,34.212.75.30,54.218.53.128,52.32.178.7
|
|
||||||
# - traefik.http.routers.yote-in-vest-webhook.middlewares=yote-in-vest-tv-ips
|
|
||||||
|
|
||||||
# Dashboard and API: password protected.
|
# Dashboard: everything else, behind Authentik
|
||||||
- traefik.http.routers.yote-in-vest.rule=Host(`${BOT_DOMAIN:-yoteinvest.dv3.app}`)
|
traefik.http.routers.yote-in-vest.rule: Host(`${BOT_DOMAIN:-yoteinvest.dv3.app}`)
|
||||||
- traefik.http.routers.yote-in-vest.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}
|
traefik.http.routers.yote-in-vest.entrypoints: websecure
|
||||||
- traefik.http.routers.yote-in-vest.tls.certresolver=${TRAEFIK_CERTRESOLVER:-letsencrypt}
|
traefik.http.routers.yote-in-vest.tls.certresolver: letsencrypt
|
||||||
- traefik.http.routers.yote-in-vest.priority=10
|
traefik.http.routers.yote-in-vest.priority: "10"
|
||||||
- traefik.http.routers.yote-in-vest.service=yote-in-vest
|
traefik.http.routers.yote-in-vest.service: yote-in-vest
|
||||||
- traefik.http.routers.yote-in-vest.middlewares=yote-in-vest-auth
|
traefik.http.routers.yote-in-vest.middlewares: authentik@docker,secure-headers@docker
|
||||||
- traefik.http.middlewares.yote-in-vest-auth.basicauth.users=${DASHBOARD_AUTH:?set DASHBOARD_AUTH in .env}
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
yote-in-vest-data:
|
yote-in-vest-data:
|
||||||
|
# Set DATA_VOLUME to the existing volume name to keep your current data
|
||||||
|
name: ${DATA_VOLUME:-yote-in-vest-data}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik:
|
proxy:
|
||||||
name: ${TRAEFIK_NETWORK:-traefik}
|
|
||||||
external: true
|
external: true
|
||||||
Reference in New Issue
Block a user