Replies: 8 comments
-
Hey @n84ck, I haven't done it myself, but this might help: https://css-tricks.com/how-to-serve-a-subdomain-as-a-subdirectory/ So the main points:
I use Cloudflare for this kind of use case for Chartbrew's blog and it works wonders: https://chartbrew.com/blog |
Beta Was this translation helpful? Give feedback.
-
Hi @razvanilin, I will try it, but currently I'm struggling with the official Docker image. I can't serve the website behind a domain, because the frontend. It send the requests to address http://localhost:4019. The REACT_APP_API_HOST variable doesn't help. Should I rebuild the docker image? |
Beta Was this translation helpful? Give feedback.
-
you will need to change the variable to your actual domain where you host your backend. Following your examples above, you could run the backend on a subdomain like |
Beta Was this translation helpful? Give feedback.
-
I tried with docker-compse as you can see on the attached image. The client still wants to connect to localhost. |
Beta Was this translation helpful? Give feedback.
-
Can you check if the client app has been rebuilt? The variable gets set only if the client is rebuilt using the new environmental variables. This command from the Dockerfile needs to run again: https://github.com/chartbrew/chartbrew/blob/master/Dockerfile#L10 |
Beta Was this translation helpful? Give feedback.
-
This image is pulled from your official docker container registry, there is no source code and building process: https://hub.docker.com/r/razvanilin/chartbrew |
Beta Was this translation helpful? Give feedback.
-
I just had a look over this and it seems the UI is not rebuilt when pulling from docker, which means the new variables are not updated in the frontend app. I'll update this in the next version, but for now you can rebuild the app manually like this: # replace 'your_container_name' with the name of your docker container where Chartbrew is running
docker exec -it -w /code/client your_container_name npm run build |
Beta Was this translation helpful? Give feedback.
-
@n84ck, new here and wondering if you are able to run it in a subdirectory eventually? I face the same problem that I only have a subdomain on a VM server and have no control to create more subdomains. could you share the docker-compose file you are using if it works? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello, Is there a possibility to integrate chartbrew into domain subdirectory?
Example: www.xyz.com -> normal webpage www.xyz/chartbrew -> chartbrew.
Currently the chartbrew want to serve the static files from the root of the domain.
Beta Was this translation helpful? Give feedback.
All reactions