Missing `RAILS_ENV` in shell causes Docker to fail
In following the docker installation steps for INK, docker volume create --name=gems
succeeds but docker-compose up
fails. I get the following error, which stops the process:
ink_1 | wait-for-it: seed_db:1234 is available after 8 seconds
ink_1 | + ./bin/bundle exec puma -b tcp://0.0.0.0:3000
ink_1 | Folding contents of StepGemfile into Gemfile
ink_1 | bundler: failed to load command: puma (/gems/bin/puma)
ink_1 | Bundler::GitError: https://gitlab.coko.foundation/INK/ink-step.git (at master@016222c) is not yet checked out. Run `bundle install` first.
The issue was that RAILS_ENV
was not set in my shell's environment (RAILS_ENV
wasn't there at all) on a Mac. Setting it with export RAILS_ENV='development'
fixed the issue and the following worked:
docker system prune
docker volume rm gems
docker-compose down -v
docker volume create --name=gems
docker-compose up
RAILS_ENV='development'
is specified in the .env.sample
, and the missing RAILS_ENV
in my shell environment was overriding this. This value should come from .env.sample
:
https://gitlab.coko.foundation/INK/ink-api/blob/master/.env.sample#L28
Full log: master_ink_docker.log