docker-cartodb
docker-cartodb copied to clipboard
grunt_true.json file is missing
When running "docker build -t="cartodb" docker-cartodb/", the build almost finished and returns:
env: ./config/grunt_true.json
Loading "Gruntfile.js" tasks...ERROR
>> Error: ./config/grunt_true.json file is missing! See ./config/grunt_true.json.sample for how it should look like
Warning: Task "production" not found. Use --force to continue.
Aborted due to warnings.
The command '/bin/sh -c cd cartodb && export PATH=$PATH:$PWD/node_modules/grunt-cli/bin && bundle install && bundle exec grunt --environment production' returned a non-zero code: 3
This is a fresh Ubuntu 16.04 install.
See this commit https://github.com/sverhoeven/docker-cartodb/commit/d919441db458208df553ed2d8ae845ff7a585c21 - might help with your issue.
I had this issue and solved part of it by changing the /config/grunt_production.json file to grunt_true.json. It eliminated the file missing error, but I still get
Warning: Task "production" not found. Use --force to continue.
and it aborts.
I didn't have any success with my previous comment, so I ended up dropping '--environment production' from the Dockerfile command and just running for development:
RUN cd cartodb &&\
export PATH=$PATH:$PWD/node_modules/grunt-cli/bin &&\
bundle install &&\
bundle exec grunt
this worked for me: 1.change the ADD line for copying the grunt config file from
ADD ./config/grunt_production.json /cartodb/config/grunt_production.json
to
ADD ./config/grunt_production.json /cartodb/config/grunt_true.json
2.change the RUN block from
RUN cd cartodb &&\
export PATH=$PATH:$PWD/node_modules/grunt-cli/bin &&\
bundle install &&\
bundle exec grunt --environment production
to
RUN cd cartodb &&\
export PATH=$PATH:$PWD/node_modules/grunt-cli/bin &&\
bundle install &&\
/bin/bash -l -c 'bundle exec grunt' && \
rm -rf .git /root/.cache/pip node_modules
Any movement on closing this and making it official?
Changing from --environment production to --environment=production does the trick
RUN cd cartodb &&
export PATH=$PATH:$PWD/node_modules/grunt-cli/bin &&
bundle install &&
bundle exec grunt --environment=production