redirecting an app installed with portainer

Hi, I'm new to runtipi. I would like to install applications not present in the catalog, like linkding. I succeeded with portainer, but I'd like to redirect the app to a subdomain. I don't know what to do: use traefik? Install nginx proxy manager?
7 Replies
rauldo
rauldoOP3w ago
precision, I'm a newbie with runtipi.
Stavros
Stavros2w ago
Hello, you basically just need to copy the traefik labels and add the container to the runtipi network I am on mobile now so I can't share the entire compose I will send you the changes in a bit
rauldo
rauldoOP2w ago
Thanks Stravos for your help
Stavros
Stavros2w ago
Alright so You need to add
networks:
tipi_main_network:
name: runtipi_tipi_main_network
external: true
networks:
tipi_main_network:
name: runtipi_tipi_main_network
external: true
in the end of your compose file Then add your container to the network
networks:
- tipi_main_network
networks:
- tipi_main_network
and finally add the labels
labels: # Use your editors search and replace feature to replace all instances of "myapp" with your app name in the traefik labels
# Main
traefik.enable: true
traefik.http.middlewares.myapp-web-redirect.redirectscheme.scheme: https
traefik.http.services.myapp.loadbalancer.server.port: 8443 # Should be the same as the app internal port so for this example 9443
# Web
traefik.http.routers.myapp-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.myapp-insecure.entrypoints: web
traefik.http.routers.myapp-insecure.service: myapp
traefik.http.routers.myapp-insecure.middlewares: myapp-web-redirect
# Websecure
traefik.http.routers.myapp.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.myapp.entrypoints: websecure
traefik.http.routers.myapp.service: myapp
traefik.http.routers.myapp.tls.certresolver: myresolver
# Local domain
traefik.http.routers.myapp-local-insecure.rule: Host(`myapp.${LOCAL_DOMAIN}`)
traefik.http.routers.myapp-local-insecure.entrypoints: web
traefik.http.routers.myapp-local-insecure.service: myapp
traefik.http.routers.myapp-local-insecure.middlewares: myapp-web-redirect
# Local domain secure
traefik.http.routers.myapp-local.rule: Host(`myapp.${LOCAL_DOMAIN}`)
traefik.http.routers.myapp-local.entrypoints: websecure
traefik.http.routers.myapp-local.service: myapp
traefik.http.routers.myapp-local.tls: true
labels: # Use your editors search and replace feature to replace all instances of "myapp" with your app name in the traefik labels
# Main
traefik.enable: true
traefik.http.middlewares.myapp-web-redirect.redirectscheme.scheme: https
traefik.http.services.myapp.loadbalancer.server.port: 8443 # Should be the same as the app internal port so for this example 9443
# Web
traefik.http.routers.myapp-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.myapp-insecure.entrypoints: web
traefik.http.routers.myapp-insecure.service: myapp
traefik.http.routers.myapp-insecure.middlewares: myapp-web-redirect
# Websecure
traefik.http.routers.myapp.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.myapp.entrypoints: websecure
traefik.http.routers.myapp.service: myapp
traefik.http.routers.myapp.tls.certresolver: myresolver
# Local domain
traefik.http.routers.myapp-local-insecure.rule: Host(`myapp.${LOCAL_DOMAIN}`)
traefik.http.routers.myapp-local-insecure.entrypoints: web
traefik.http.routers.myapp-local-insecure.service: myapp
traefik.http.routers.myapp-local-insecure.middlewares: myapp-web-redirect
# Local domain secure
traefik.http.routers.myapp-local.rule: Host(`myapp.${LOCAL_DOMAIN}`)
traefik.http.routers.myapp-local.entrypoints: websecure
traefik.http.routers.myapp-local.service: myapp
traefik.http.routers.myapp-local.tls: true
follow the instructions in the comments
rauldo
rauldoOP2w ago
If I understand : the first and the third in the linkding docker compose in portainer ? And the second ? (networks: - tipi_main_network), where do I put it ?
Stavros
Stavros2w ago
The networks thing in the end of your compose file Not inside the service The second networks code block goes inside your service as well as the labels
rauldo
rauldoOP2w ago
Thanks, I'll try thanks Stravos, it works

Did you find this page helpful?