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?
8 Replies
rauldo
rauldoOP4w ago
precision, I'm a newbie with runtipi.
Stavros
Stavros4w 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
rauldoOP4w ago
Thanks Stravos for your help
Stavros
Stavros4w 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
rauldoOP4w 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
Stavros4w 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
rauldoOP4w ago
Thanks, I'll try thanks Stravos, it works
justme
justme4h ago
Hi, I hope it is okay that I'm hijacking this tread, since I basically wanted to ask the same question & tried following the instructions listed here. I am trying to deploy AIOStreams (https://github.com/Viren070/AIOStreams) and have adjusted the configuration like so:
version: "3.8"

services:
aiostreams:
image: ghcr.io/viren070/aiostreams:latest
container_name: aiostreams
restart: unless-stopped
ports:
- 3000:3000
env_file:
- stack.env
healthcheck:
test: wget -qO- http://localhost:3000/health
interval: 1m
timeout: 10s
retries: 5
start_period: 10s
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.aiostreams-web-redirect.redirectscheme.scheme: https
traefik.http.services.aiostreams.loadbalancer.server.port: 3000
# Web
traefik.http.routers.aiostreams-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.aiostreams-insecure.entrypoints: web
traefik.http.routers.aiostreams-insecure.service: aiostreams
traefik.http.routers.aiostreams-insecure.middlewares: aiostreams-web-redirect
# Websecure
traefik.http.routers.aiostreams.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.aiostreams.entrypoints: websecure
traefik.http.routers.aiostreams.service: aiostreams
traefik.http.routers.aiostreams.tls.certresolver: myresolver
# Local domain
traefik.http.routers.aiostreams-local-insecure.rule: Host(`aiostreams.${LOCAL_DOMAIN}`)
traefik.http.routers.aiostreams-local-insecure.entrypoints: web
traefik.http.routers.aiostreams-local-insecure.service: aiostreams
traefik.http.routers.aiostreams-local-insecure.middlewares: aiostreams-web-redirect
# Local domain secure
traefik.http.routers.aiostreams-local.rule: Host(`aiostreams.${LOCAL_DOMAIN}`)
traefik.http.routers.aiostreams-local.entrypoints: websecure
traefik.http.routers.aiostreams-local.service: aiostreams
traefik.http.routers.aiostreams-local.tls: true

networks:
tipi_main_network:
name: runtipi_tipi_main_network
external: true
version: "3.8"

services:
aiostreams:
image: ghcr.io/viren070/aiostreams:latest
container_name: aiostreams
restart: unless-stopped
ports:
- 3000:3000
env_file:
- stack.env
healthcheck:
test: wget -qO- http://localhost:3000/health
interval: 1m
timeout: 10s
retries: 5
start_period: 10s
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.aiostreams-web-redirect.redirectscheme.scheme: https
traefik.http.services.aiostreams.loadbalancer.server.port: 3000
# Web
traefik.http.routers.aiostreams-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.aiostreams-insecure.entrypoints: web
traefik.http.routers.aiostreams-insecure.service: aiostreams
traefik.http.routers.aiostreams-insecure.middlewares: aiostreams-web-redirect
# Websecure
traefik.http.routers.aiostreams.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.aiostreams.entrypoints: websecure
traefik.http.routers.aiostreams.service: aiostreams
traefik.http.routers.aiostreams.tls.certresolver: myresolver
# Local domain
traefik.http.routers.aiostreams-local-insecure.rule: Host(`aiostreams.${LOCAL_DOMAIN}`)
traefik.http.routers.aiostreams-local-insecure.entrypoints: web
traefik.http.routers.aiostreams-local-insecure.service: aiostreams
traefik.http.routers.aiostreams-local-insecure.middlewares: aiostreams-web-redirect
# Local domain secure
traefik.http.routers.aiostreams-local.rule: Host(`aiostreams.${LOCAL_DOMAIN}`)
traefik.http.routers.aiostreams-local.entrypoints: websecure
traefik.http.routers.aiostreams-local.service: aiostreams
traefik.http.routers.aiostreams-local.tls: true

networks:
tipi_main_network:
name: runtipi_tipi_main_network
external: true
Am I doing something wrong? Any help would be greatly appreciated. 😅 I can access it over the local network with the local ip address and port. But when I try to open aiostreams.domain.tld I just get to the runtipi login page (nothing happens when pressing sign in). Nevermind :D For future readers: You of course have to set the URL in APP_DOMAIN under the environment variables :SCfall: Works flawlessly now, thank you very much for the project

Did you find this page helpful?