Closed riipeckx closed 4 years ago
In your Dockerfile try to change the API_URI to the correct website address(instead of localhost:8000) so when you build it, it builds with the correct API_URI.
I should note that I only needed to do this when using the production Dockerfile which runs "npm run build".
In your Dockerfile try to change the API_URI to the correct website address(instead of localhost:8000) so when you build it, it builds with the correct API_URI.
I should note that I only needed to do this when using the production Dockerfile which runs "npm run build".
In fact yes, when I rebuild the Docker Image, it afftects it well but this is not a good implementation of this Environment Variable.. But well, for the moment, i'll do that, thanks for your answer :)
What I'm trying to achieve
Set the API_URI env in Docker Swarm by setting it in my docker-compose.yml
Steps to reproduce the problem
Add this code to docker-compose.yml
execute
docker stack deploy -c docker-compose.yml <stackName>
Head to the website
What I expected to happen
The container connects to the core one through the
API_URI
address contained in the docker-compose.ymlScreenshots
The container connects through the default url, not the
API_URI
address contained in the docker-compose.ymlSystem information Operating system: Linux Debian 10 - Docker 19.03.13 Browser: Chrome Version 86.0.4240.183 (Official Build) (64-bit)