chriswhong / docker-cartodb

Dockerization for CartoDB
126 stars 53 forks source link

grunt_true.json file is missing #24

Open mgottholsen opened 7 years ago

mgottholsen commented 7 years ago

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.

sindile commented 7 years ago

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

brambow commented 7 years ago

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 commented 7 years ago

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 
arminakvn commented 7 years ago

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   
willkara commented 6 years ago

Any movement on closing this and making it official?

vichaos commented 6 years ago

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