-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nginx Homepage after installation with Docker-Compose behind traefik #3154
Comments
|
Okay but wait @smilerz !!! But why the nginx container doesn't forward the requests to the |
nginx does forward to tandoor port 8080. there is an example traefik config here. |
I've modified the docker-compose according to what you posted @smilerz version: "3.5"
services:
tandoor_db:
restart: always
image: postgres:16-alpine
ports:
- "80"
volumes:
- /home/swarm/tandoor/postgresql:/var/lib/postgresql/data
env_file:
- /home/swarm/tandoor/.env
networks:
- tandoor
web_recipes:
restart: always
image: vabene1111/recipes
env_file:
- /home/swarm/tandoor/.env
volumes:
- tandoor-volume:/opt/recipes/staticfiles
- nginx_config:/opt/recipes/nginx/conf.d
- /home/swarm/tandoor/mediafiles:/opt/recipes/mediafiles
depends_on:
- tandoor_db
networks:
- web
- tandoor
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.recipes.rule=Host(`tandoor.home`) && PathPrefix(`/*`)"
- "traefik.http.services.recipes.loadbalancer.server.port=8080"
- "traefik.docker.network=recipes"
- "io.portainer.accesscontrol.users=admin"
- "traefik.http.routers.recipes.tls=true"
nginx_recipes:
image: nginx:mainline-alpine
restart: always
ports:
- "80"
networks:
- web
- tandoor
env_file:
- /home/swarm/tandoor/.env
volumes:
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/etc/nginx/conf.d:ro
- tandoor-volume:/static:ro
- /home/swarm/tandoor/mediafiles:/media:ro
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.tandoor.rule=Host(`tandoor.home`)"
- "traefik.http.services.tandoor.loadbalancer.server.port=80"
- "traefik.docker.network=web"
- "io.portainer.accesscontrol.users=admin"
- "traefik.http.routers.tandoor.tls=true"
depends_on:
- web_recipes
networks:
tandoor:
driver: overlay
attachable: true
name: tandoor
web:
external: true
name: web
volumes:
nginx_config:
tandoor-volume:
But the nginx still does not forward the request. I have the
So it doesn't forward in my case I tried using curl:
I really need explanation to this... :/ |
Issue
I get following homepage after setting up Tandoor with Docker Swarm behind Traefik:
The changes that I added were
server.port
in traefik labelsWithout It I got "Bad Gateway" error when accessing the page.
Tandoor Version
latest
OS Version
Ubuntu 23.04 x86_64
Setup
Docker / Docker-Compose
Reverse Proxy
Traefik
Other
Docker Swarm
Environment file
Docker-Compose file
Relevant logs
tandoor_db logs:
web_recipes logs (If It listens to port 8080, then why do we need nginx_recipes container?):
The text was updated successfully, but these errors were encountered: