Skip to content
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

Merged
merged 9 commits into from
Sep 23, 2024

Conversation

KuramaSyu
Copy link
Contributor

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.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 20, 2024
Copy link
Member

@bo0tzz bo0tzz left a 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?

Comment on lines 81 to 87
http:
tls:
certresolver: cloudflare-resolver
domains:
- main: "*.domain.com"
sans:
- "domain.com"
Copy link
Member

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.

Copy link
Contributor Author

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

Comment on lines 103 to 129
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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?

@KuramaSyu
Copy link
Contributor Author

KuramaSyu commented Sep 20, 2024

Does this enable websockets as well?

As far as I know it does, if the websocket also uses port 443 what it should do.

@bo0tzz bo0tzz changed the title Added a docs section for the Traefik Reverse Proxy docs: add section for Traefik Reverse Proxy Sep 20, 2024
changed timeout values

Co-authored-by: dvbthien <89862334+dvbthien@users.noreply.github.com>
@danieldietzler
Copy link
Member

@zp33dy could you fix the formatting issues?

@KuramaSyu
Copy link
Contributor Author

@zp33dy could you fix the formatting issues?

Can I see somewhere what the issues are?

@danieldietzler
Copy link
Member

@zp33dy could you fix the formatting issues?

Can I see somewhere what the issues are?

Run npm run format

@alextran1502 alextran1502 merged commit 147747d into immich-app:main Sep 23, 2024
32 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
changelog:documentation documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants