What could be causing a bad gateway message with an Indicium docker container?
I've already verified that all containers (including traefik) are on the same Docker network (the default network made by docker compose).
This is the line from the traefik log:
502 Bad Gateway error="dial tcp 172.18.0.6:8080: connect: connection refused"
According to βdocker network inspectβ 172.18.0.6 is the correct internal IP address for the Indicium container.
This weirdly doesn't happen with the Universal container as it serves the login page just fine.
Each container uses its own subdomain as the external host.
This is my docker-compose.yaml:
---
services:
proxy:
image: traefik
restart: unless-stopped
ports:
- 80:80
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--accesslog=true"
- "--log.level=DEBUG"
- "--log.filePath=/logs/traefik.log"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- ./logs/:/logs/
universal_prod:
image: registry.thinkwisesoftware.com/public/universal:${TAGPROD}
restart: unless-stopped
environment:
- SERVICE_URL=http://${EXTERNAL_HOST_INDICIUM_PROD}/indicium/iam/iam
- DEFAULT_APPLICATION=APP
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`${EXTERNAL_HOST_UNIVERSAL_PROD}`)"
indicium_prod:
image: registry.thinkwisesoftware.com/public/indicium:${TAGPROD}
restart: unless-stopped
environment:
- SQL_SERVER=${SQL_SERVER_PROD}
- SQL_DATABASE=${SQL_DATABASE_PROD}
- SQL_USERNAME=${SQL_USERNAME_PROD}
- SQL_PASSWORD=${SQL_PASSWORD_PROD}
- ENABLE_REVERSE_PROXY=true
- ALLOWED_HEADERS=All
- TRUSTED_NETWORKS=0.0.0.0/0
- EXTERNAL_PATH_BASE=/indicium
- CUSTOM_JSON={"Agent":{"Enabled":false}}
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=(Host(`${EXTERNAL_HOST_INDICIUM_PROD}`) && PathPrefix(`/indicium`))"
- "traefik.http.middlewares.backend.stripprefix.prefixes=/indicium"
- "traefik.http.routers.backend.middlewares=backend"
This is my .env file:
# Versions of the images to pull
TAGPROD=2025.1
# Hostnames/IP addresses to access the platforms
EXTERNAL_HOST_INDICIUM_PROD=indicium.domain.local
EXTERNAL_HOST_UNIVERSAL_PROD=universal.domain.local
# Hostnames/IP addresses of the database servers
SQL_SERVER_PROD=HOSTNAME
# Databases to use
SQL_DATABASE_PROD=DBNAME
# Usernames to access the databases
SQL_USERNAME_PROD=******
# Passwords to access the databases
SQL_PASSWORD_PROD=******