Self-hosted version provides http src as `127.0.0.1:3000`
BackedUpBooty opened this issue ยท 5 comments
Describe the bug
I created a reverse proxy to access the gui via my sub.domain.com. The documentation I found doesn't really give info for this, however the tags being generated for applications still show src=http://127.0.0.1:3000/edge/xxxxxxxxxxxxxxxxxxx
. I have tried changing the PROXY_LOCATION
and the S8_EDGE_SERVER
to my sub.domain.com but the generated tags still show the src listed above.
How do we change the tag so that it will work via reverse proxy? Doing it manually doesn't seem to work
To Reproduce
Steps to reproduce the behavior:
- Create service via docker-compose (including trying to use https://mysub.domain.com as proxy location and edge server)
- Create reverse proxy to access via 'mysub.domain.com`
- Create User
- Log in
- Create application
- View generated tag
Expected behavior
Generated tag would follow a template which allowed for reverse proxies, something like:
Additional context
Hardware
- Synology NAS (DS920+)
- Nameserver is Cloudflare
@BackedUpBooty thank you for the bug report.
Just to clarify that you are using a load balancer to terminate SSL and then proxy that on? Are you doing it all via docker-compose locally?
We'll investigate using the steps you have provided and update this thread with configuration steps or push a fix.
Hey thanks for the quick reply.
I only have the one server which both the proxy and scale8 services are running on.
Proxy is a pre-existing SWAG docker container (essentially nginx + LE certificate host) which is pointing at the router
container (which I guess is an nginx container itself at the end of the day).
Yes everything is being run via docker-compose locally.
Awesome, thank you for the extra info. We'll replicate your setup and get this sorted for you.
@BackedUpBooty - I have updated docker-compose.yml to reflect the router setting requirement.
api:
image: scale8/api:latest
container_name: api
depends_on:
- mongodb
expose:
- "8082"
environment:
# To connect to a local version of MongoDB, use mongodb://host.docker.internal .
MONGO_CONNECT_STRING: "mongodb://mongodb"
# When booting, we want the server to run the setup job (this will race if multiple API servers are booted at the same time)
SETUP_MODE: "true"
# The UI server...
S8_UI_SERVER: "http://127.0.0.1:8080"
If you change S8_UI_SERVER
to https://mysub.domain.com
that will make sure the generated tag is correct.
edge:
image: scale8/edge:latest
container_name: edge
depends_on:
- mongodb
expose:
- "6080"
environment:
# Run in production
S8_ENV: "production"
# To connect to a local version of MongoDB, use mongodb://host.docker.internal .
MONGO_CONNECT_STRING: "mongodb://mongodb"
# The API server - required for generating live previews. Here we refer to the 'api' server as defined below.
S8_API_SERVER: "http://api:8082"
# The root server refers to the entry point of the network. In this example, we are using the 'route' defined below.
S8_EDGE_SERVER: "http://127.0.0.1:8080"
# Proxy a platform's live build in. PROXY_FOR can be either be 'core' or the platform id associated with the platform.
# PROXY_FOR: "core"
# PROXY_LOCATION: "http://host.docker.internal:3124/main.js"
Then in the edge config, change S8_EDGE_SERVER
to https://mysub.domain.com
.
PROXY_LOCATION
is purely for debugging and creating platforms. You don't need to change it.
Please let me know if you have any other issues.
Hey thanks very much, that did it! I'll close the ticket now, thanks for such a speedy fix. Looking forward to playing around with this now.