The Artifactory docker container uses port 8081 for its API and 8082 for its web UI. If I expose both ports and access the web UI using localhost:8081 it redirects to localhost:8082/ui just fine and the app works as expected. However, when Traefik is placed in front as my reverse proxy, my Traefik configuration efforts seem to always result in the redirect resulting in an "HTTP Status 404 - Not Found" page. My build system and several other services work fine accessed via Traefik. Here is my current configuration:
traefik:
image: docker.xenonet.com/traefik:1.7.12-alpine
build:
context: .
dockerfile: ./images/docker-traefik/Dockerfile
args:
- VERSION=1.7.12-alpine
# command: --logLevel=DEBUG
container_name: traefik
ports:
- "8080:8080" # Please read: https://docs.traefik.io/configuration/api/#security
- "443:443"
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- buildsys
artifactory:
image: docker.bintray.io/jfrog/artifactory-cpp-ce:latest
container_name: artifactory
ports:
- "8081:8081"
- "8082:8082"
# volumes:
# - artifactory-data:/var/opt/jfrog/artifactory
networks:
- buildsys
labels:
# - "traefik.api.backend=artifactory-api"
# - "traefik.api.port=8081"
# - "traefik.api.frontend.entryPoints=http,https"
# - "traefik.api.frontend.rule=Host:artifactory.example.com"
- "traefik.ui.backend=artifactory-ui"
- "traefik.ui.port=8081"
- "traefik.ui.frontend.entryPoints=http,https"
- "traefik.ui.frontend.rule=Host:artifactory.example.com"