I coudn't set environment variables properly even after adding nginx-env.conf to the /etc/nginx/main.d directory.
When I start app directly with rails server command, everything works as expected.
And when I set value in the nginx-env.conf file as shown below, it works as well.
I coudn't set environment variables properly even after adding
nginx-env.conf
to the/etc/nginx/main.d
directory.When I start app directly with
rails server
command, everything works as expected. And when I set value in thenginx-env.conf
file as shown below, it works as well.But if I remove the Env value as described in the documentation, the environment variables are not visible in the rails app.
Current Setting
nginx-env.conf
.env
Dockerfile
docker-compose.yml
nginx.conf
Starting command