docker-cartodb icon indicating copy to clipboard operation
docker-cartodb copied to clipboard

grunt_true.json file is missing

Open mgottholsen opened this issue 7 years ago • 6 comments

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.

mgottholsen avatar Sep 12 '17 18:09 mgottholsen

See this commit https://github.com/sverhoeven/docker-cartodb/commit/d919441db458208df553ed2d8ae845ff7a585c21 - might help with your issue.

sindile avatar Sep 13 '17 04:09 sindile

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.

brambow avatar Sep 20 '17 16:09 brambow

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 

brambow avatar Sep 20 '17 17:09 brambow

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	

arminakvn avatar Oct 14 '17 02:10 arminakvn

Any movement on closing this and making it official?

willkara avatar Feb 18 '18 05:02 willkara

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

vichaos avatar Mar 02 '18 11:03 vichaos