Hi community,
I am trying to deploy flowise.ai on a Free Tier OCI compute instance with Ubuntu Image. I discovered Traefik to be a good option for a reverse proxy. I am using a custom domain: flowise.[reacted].[redacted]
and to make it accessible on HTTPS, I am using Let's encrpyt with HTTP Challenge method. So far I have no issues with flowise service on URL:
https://flowise.[redacted].[redacted]
But when I use go to /traefik
, there's no 404 error just a blank page. The logs doesn't show anything.
This is my compose file:
services:
traefik:
image: "traefik:v2.11"
container_name: "traefik"
restart: always
command:
#- "--log.level=DEBUG"
#- '--api=true'
- '--api.dashboard=true'
#- '--providers.docker.endpoint=unix:///var/run/docker.sock'
- "--api.insecure=false"
- "--providers.docker=true"
- '--providers.docker.network=traefik-public'
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.email=myemail@example.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
labels:
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
## HTTP Catchall for redirecting HTTP -> HTTPS
- 'traefik.http.routers.http-catchall.rule=PathPrefix(`/`)'
- 'traefik.http.routers.http-catchall.entrypoints=web'
- 'traefik.http.routers.http-catchall.middlewares=redirect-to-https'
- 'traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https'
## Traefik Dashboard
- "traefik.http.routers.dashboard.rule=Host(`${DOMAIN}`) && (PathPrefix(`/traefik`) || PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- 'traefik.http.routers.dashboard.entrypoints=websecure'
- 'traefik.http.routers.dashboard.tls.certresolver=myresolver'
- 'traefik.http.routers.dashboard.service=api@internal'
- 'traefik.http.services.api@internal.loadbalancer.server.port=8080' # Required in swarms, https://doc.traefik.io/traefik/v2.0/routing/providers/docker/#services
# - 'traefik.http.routers.traefik.middlewares=traefik-auth'
# - 'traefik.http.middlewares.traefik-auth.basicauth.users=admin:$$apr1$$8EVjn/nj$$GiLUZqcbueTFeD23SuB6x0' # username: admin, password: admin
- 'traefik.http.routers.dashboard.middlewares=strip'
- 'traefik.http.middlewares.strip.stripprefix.prefixes=/traefik'
ports:
- "80:80"
- "443:443"
- "8080:8080"
networks:
- traefik-public
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
flowise:
image: flowiseai/flowise
restart: always
environment:
- ...
ports:
- '${PORT}:${PORT}'
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.flowise.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.flowise.entrypoints=websecure"
- "traefik.docker.network=traefik-public"
- "traefik.constraint-label=traefik-public"
- "traefik.http.routers.flowise.tls.certresolver=myresolver"
- 'traefik.http.routers.flowise.service=webapp'
- "traefik.http.services.webapp.loadbalancer.server.port=${PORT}"
volumes:
- "~/.flowise:/root/.flowise"
command: /bin/sh -c "sleep 3; flowise start"
networks:
traefik-public:
And the .env
file:
PORT=3000
DATABASE_PATH=/root/.flowise
APIKEY_PATH=/root/.flowise
SECRETKEY_PATH=/root/.flowise
LOG_PATH=/root/.flowise/logs
BLOB_STORAGE_PATH=/root/.flowise/storage
CORS_ORIGINS="['http://your.domain.com', 'http://localhost' ]"
# IFRAME_ORIGINS="*"
# NUMBER_OF_PROXIES= 1
DOMAIN="your.domain.com"
FLOWISE_USERNAME=
FLOWISE_PASSWORD=
# FLOWISE_SECRETKEY_OVERWRITE=myencryptionkey
# FLOWISE_FILE_SIZE_LIMIT=50mb
DEBUG=true
# LOG_LEVEL=debug (error | warn | info | verbose | debug)
LOG_LEVEL=verbose
# TOOL_FUNCTION_BUILTIN_DEP=crypto,fs
# TOOL_FUNCTION_EXTERNAL_DEP=moment,lodash
# LANGCHAIN_TRACING_V2=true
# LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
# LANGCHAIN_API_KEY=your_api_key
# LANGCHAIN_PROJECT=your_project
# DISABLE_FLOWISE_TELEMETRY=true
What I wanted to achieve?
I need to access the Traefik Dashboard by using this route:
https://flowise.[redacted].[redacted]/traefik/dashboard
Additional Info:
- The environment variables for flowise container can be configured with .env.template
- I followed this guide to setup my Traefik service with the
/traefik
as dashboard route
I am a newbie using traefik for first time. Looking forward for any help is much appreciated!
Thank you.