-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docs: add section for Traefik Reverse Proxy #12813
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to keep the config as minimal as possible, just like in the other examples.
Does this enable websockets as well?
http: | ||
tls: | ||
certresolver: cloudflare-resolver | ||
domains: | ||
- main: "*.domain.com" | ||
sans: | ||
- "domain.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this section required? The other examples just show a plain http setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, for http it's not required. I'll remove it
immich-server: | ||
container_name: immich_server | ||
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} | ||
volumes: | ||
- ${UPLOAD_LOCATION}:/usr/src/app/upload | ||
- /etc/localtime:/etc/localtime:ro | ||
env_file: | ||
- .env | ||
ports: | ||
- 2283:3001 | ||
networks: | ||
# this is the network where traefik is in | ||
- proxy | ||
# this is the network where all other immich containers are in | ||
- default | ||
depends_on: | ||
- redis | ||
- database | ||
restart: always | ||
healthcheck: | ||
disable: false | ||
labels: | ||
traefik.enable: true | ||
# increase readingTimeouts for the entrypoint used here | ||
traefik.http.routers.immich.entrypoints: websecure | ||
traefik.http.routers.immich.rule: Host(`immich.your-domain.com`) | ||
traefik.http.services.immich.loadbalancer.server.port: 3001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
immich-server: | |
container_name: immich_server | |
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} | |
volumes: | |
- ${UPLOAD_LOCATION}:/usr/src/app/upload | |
- /etc/localtime:/etc/localtime:ro | |
env_file: | |
- .env | |
ports: | |
- 2283:3001 | |
networks: | |
# this is the network where traefik is in | |
- proxy | |
# this is the network where all other immich containers are in | |
- default | |
depends_on: | |
- redis | |
- database | |
restart: always | |
healthcheck: | |
disable: false | |
labels: | |
traefik.enable: true | |
# increase readingTimeouts for the entrypoint used here | |
traefik.http.routers.immich.entrypoints: websecure | |
traefik.http.routers.immich.rule: Host(`immich.your-domain.com`) | |
traefik.http.services.immich.loadbalancer.server.port: 3001 | |
immich-server: | |
... | |
labels: | |
traefik.enable: true | |
# increase readingTimeouts for the entrypoint used here | |
traefik.http.routers.immich.entrypoints: websecure | |
traefik.http.routers.immich.rule: Host(`immich.your-domain.com`) | |
traefik.http.services.immich.loadbalancer.server.port: 3001 |
No need to reproduce the whole block here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at least the networks section where the network for traefik is added is needed. Otherwise it wont work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. in general we don’t teach people how to set up the proxy themself, just the Immich specific stuff. The network setup would vary greatly between different setups so thats why it may not be best to include. Also there is no requirement to use separate networks, they can all be on one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add a comment that says something like # make sure that Traefik is able to communicate with the network of the Immich server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it by replaceing the networking stuff with a last information sentence. Is it fine now?
As far as I know it does, if the websocket also uses port 443 what it should do. |
changed timeout values Co-authored-by: dvbthien <89862334+dvbthien@users.noreply.github.com>
Leaving it at 0 may be also bad practice
@zp33dy could you fix the formatting issues? |
Can I see somewhere what the issues are? |
Run |
This adds a section for an example Traefik Proxy config. This is needed because the readingTimeouts leed to video-uploads failing after 60 seconds uploading. See here for more information. In the example the issue is "resolved" by increasing the default timeout to 600 seconds instead of 60 seconds.