Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

Add docker

Open jasonrfarkas opened this issue 5 years ago • 4 comments
trafficstars

@nsantacruz

jasonrfarkas avatar Aug 02 '20 02:08 jasonrfarkas

Hey @jasonrfarkas, thanks the PR!

Trying to get it to run locally, I ran into some issues. I think you should add to the README that you need to download the mongo dump before running the docker commands. Is that correct? However, I think this will make the docker context huge.

Another thing I ran into. While running docker-compose up --build I got this error

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-02T14_18_17_066Z-debug.log

ERROR: Service 'web' failed to build: The command '/bin/sh -c npm install && npm run build-prod' returned a non-zero code: 1

nsantacruz avatar Aug 02 '20 14:08 nsantacruz

Thats correct - before running the dump command at least.

yah so I didn't look to far into it - but I also sometimes got the issue above with cb not being called. then I would redo the command and it would work.

I was thinking it was an odd thing to be fickel - it may have something to do with memory Ideally I would be moving everything down a level so the containers +context can be smaller - but that will be a massive PR....

jasonrfarkas avatar Aug 02 '20 16:08 jasonrfarkas

@nsantacruz I've update the node version and it seems not to be giving me any issues anymore ( This was a preexisting issue it seems) Please confirm if it is now working on your end.

jasonrfarkas avatar Aug 03 '20 00:08 jasonrfarkas

I got to the next command. I'm running docker-compose exec mongo mongorestore --drop at the root of the Sefaria-Project fork, but I'm getting

2020-08-04T12:26:24.754+0000	Failed: mongorestore target 'dump' invalid: stat dump: no such file or directory
2020-08-04T12:26:24.754+0000	0 document(s) restored successfully. 0 document(s) failed to restore.

Even though I do have a dump folder in the root of the Sefaria-Project fork.

nsantacruz avatar Aug 04 '20 12:08 nsantacruz