In the docs for rcstack it says to change the ports if they are unavailable. I’ve tried to change them via the docker-compose-router.override.yaml but my settings seem to have been ignored and i end up with this error:
root@monarch5:/opt/docker-rhodecode# ./rcstack stack all up -d
WARN[0000] /opt/docker-rhodecode/docker-compose-base.yaml: `version` is obsolete
WARN[0000] /opt/docker-rhodecode/docker-compose-router.yaml: `version` is obsolete
WARN[0000] /opt/docker-rhodecode/.custom/docker-compose-router.override.yaml: `version` is obsolete
[+] Running 0/1
⠼ Container rc_cluster_router-traefik-1 Starting 0.5s
Error response from daemon: driver failed programming external connectivity on endpoint rc_cluster_router-traefik-1 (6a3c2edcd944857527148196c47bc5b41c107f18b406ccf969b797ef85b2a7cc): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
I attached my yaml below:
version: '3.9'
## docker network create -d overlay lb-net
services:
traefik:
ports:
# # The Web UI (enabled by --api.insecure=true)
# # uncomment to expose dashboard at port :7000,
# # this is mostly for debugging routes and services
# - "7000:7000"
- "8072:80"
- "8073:443"
volumes:
# Bind to docker.sock that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# # custom traefik config, enable SSL etc...
# # put your traefik setup in this directory structure, and uncomment to override
# # default traefik static/dynamic configs
# - $PWD/.custom/traefik_custom:/etc/traefik:ro
# - $PWD/.custom/traefik_custom/dynamic:/etc/traefik_dynamic:ro
# # Mount ACME shared json config for lets-encrypt
# - $PWD/.custom/traefik_custom/acme:/acme
environment:
RC_COMPOSE_OVERRIDE: 1
labels:
- "traefik.enable=true"
Quick Update: after modifying the docker-router-compose.yml directly, i now can get the rhodecode dashboard up on port 10020 but the edge router displays this:
So here’s an example how to change default 80 port to 85
## docker network create -d overlay lb-net
services:
traefik:
restart: always
image: traefik:v2.10.7
ports:
# Default ports on Edge router.
# Format is HOST:CONTAINER
# To modify the HOST ports only change the first parts before colon.
#
# The HTTP port, exposed as http entrypoint
- "80:80"
# The HTTPS port, exposed as https entrypoint
- "443:443"
# The loki port, exposed as loki entrypoint behind auth
- "3100:3100"
# The SSH port exposed as sshd entrypoint, default 9022
- "${RC_SSH_PORT:-9022}:${RC_SSH_PORT:-9022}"
unfortunetly this can’t be done via an override yaml config at the moment. So the main edge router yaml file needs a modification.
Hi, thanks for this new override method. But even if i override the traefik ports, the edge router keeps reporting that the backend isn’t online. I opened up a direct port in docker to the rhodecode dashboard on 10020 which I’ve been using for the past week and that works fine, I’m just still confused why the edge router itself flat out doesnt work
I have SSL disabled because I proxy rhodecode out through nginx and cloudflare which handle proxy-ing with SSL. Currently code.luxploit.net is pointing to the 10020 port (direct) rather then the 8072 port (traefik), as pointing it to Port 8072 will incur the traefik error, as seen in my second reply. Using the direct port it works but I’d still like to get the stack working as it should
the matching is on “hostname” sent to traefik, if this can’t be detected traefik wont match to running RhodeCode. Maybe cloudflare is not sending in proper hostname, or it’s sending https (while traefik expects http, which is interesting case…)
This could explain it as cloudflare will upgrade the connection automatically to HTTPS and nginx also listens for HTTPS. I could try setting the hostname to https and seeing if that makes a difference in traefik