Hey, i have a traefik in docker compose wich is like this:
services:
reverse-proxy:
image: traefik:v3.2
container_name: reverse-proxy
command:
# - "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.postgres.address=:5500"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email="
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--accesslog=true" # Active les logs d'accès HTTP
- "--providers.file.directory=/etc/config_tls/"
- "--providers.file.watch=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt:/letsencrypt
- ./tls:/etc/config_tls/
ports:
- "80:80"
- "443:443"
- "5500:5500"
networks:
- my-network
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
networks:
my-network:
name: my-network
driver: bridge
I have another docker compose for another app B:
services:
# ----------------- ORS application configuration ------------------- #
ors-app:
# Activate the following lines to build the container from the repository
# You have to add --build to the docker compose command to do so
build:
context: ./
container_name: ors-app
ports:
- "8082:8082" # Expose the ORS API on port 8080
- "9001:9001" # Expose additional port for monitoring (optional)
image: openrouteservice/openrouteservice:v9.0.0
# Advanced option! If you different ids to 0:0 and 1000:1000, you have to rebuild the container with the build args UID,GID.
# The user command is useful if you want easier bind mount access or better security.
user: "1000:1000" # Run "mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/files ors-docker/graphs ors-docker/logs && sudo chown -R 1000:1000 ors" before starting the container!
volumes: # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
- ./ors-docker:/home/ors # Mount the ORS application directory (for logs, graphs, elevation_cache, etc.) into its own directory
#- ./graphs:/home/ors/graphs # Mount graphs directory individually
#- ./elevation_cache:/home/ors/elevation_cache # Mount elevation cache directory individually
- ./ors-docker/config:/home/ors/config # Mount configuration directory individually
#- ./logs:/home/ors/logs # Mount logs directory individually
#- ./files:/home/ors/files # Mount files directory individually
networks:
- my-network
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.ors.rule=Host(`maindomain`) && PathPrefix(`/ors`)"
- "traefik.http.routers.ors.service=ors"
- "traefik.http.routers.ors.entrypoints=websecure"
- "traefik.http.routers.ors.middlewares=test-redirectscheme,ors-stripprefix"
- "traefik.http.routers.ors.tls.certresolver=myresolver"
# Services
- "traefik.http.services.ors.loadbalancer.server.port=8082"
# Middleware
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent=true"
- "traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes=/ors"
- "traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash=true"
networks:
my-network:
external: true
I would like to connect to this application with mainDomain/ors but i always get 404 error.
What am i doing wrong here ?
Thanks !