Answer the question
In order to leave comments, you need to log in
Docker & web app?
I have a web application that is built by Webpack to run under Nginx.
There is a Docker container with this web application.
Question: is it possible to specify the API URL through environment variables?
If you use node.js, then there are no questions, but what about when using nginx.
Answer the question
In order to leave comments, you need to log in
edit nginx configs by script?
sed -i "s/%%%%%%/$API_URL/ig" "/etc/nginx/nginx.conf"
You can, in the entrypoint script, get from ENV and change the necessary files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question