Answer the question
In order to leave comments, you need to log in
How to create a docker image on heroku server using existing environment variables?
Hello!
I have a rails app on heroku that I need to apply docker to. I use the following way: https://devcenter.heroku.com/articles/build-docker...
I have a heroku.yml and a Dockerfile. The Dockerfile contains a layer for compiling assets RUN bundle exec rake assets:precompile
. When I run git push heroku master
docker, the image is built on the heroku side, but there are errors at the asset compilation stage due to the fact that the heroku environment variables are not available at the build stage.
If you declare environment variables in heroku.yml, then the assets compile successfully, but how do you make sure that existing heroku variables are used?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question