Closed parruc closed 3 years ago
Also, I forgot... Actually both the dockerfiles pulls from my fork to work, We can change them when we will merge the PRS
If this repo is meant to be used by contributors, could you please add a README
file to explain how to use it?
I drafted it: feel free to complete or ask for clarifications if something missing/not clear: I'm not very good at writing readme ;-)
I tried to run it in dev mode, but I can't seem to build the frontend. I tried to resolve the error, but I can't seem to fix it. It already worked for me before when I tested the production mode. Any idea what would cause that?
Step 7/11 : RUN git clone https://github.com/parruc/librephotos-frontend.git /usr/src/app
---> Using cache
---> 60d0e5fb7d20
Step 8/11 : RUN npm ci
---> Running in 15a1f4be6ba9
added 1642 packages, and audited 1643 packages in 59s
41 vulnerabilities (34 low, 3 moderate, 4 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
Removing intermediate container 15a1f4be6ba9
---> fa213de4bfb3
Step 9/11 : RUN npm build
---> Running in b99310e417d6
npm ERR! code ENOENT
npm ERR! syscall spawn man
npm ERR! path man
npm ERR! errno -2
npm ERR! enoent spawn man ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-02-18T13_36_14_484Z-debug.log
ERROR: Service 'frontend' failed to build : The command '/bin/sh -c npm build' returned a non-zero code: 254
That was the error I was getting with build inside the dockerfile instead of the entrypoint. And here it is again but with some luck will be enough to add commit and push the package-lock.json file.
Rebuild from scratch and try again (be careful not to use cache during build to ensure a new checkout) or just pull inside the code frontend folder. You sdhould get the lock file
Something wrong with shrinkwrap/package-lock.json but I'm no expert on npm. I solved replacing npm ci with npm install in dockerfile Try again with sudo docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d after docker repo pull
Now all entrypoints and config file are inside the relative images so we should be back to "no git needed" situation for prod build.
Alright, I only found one more issue. If you start it up in production mode serve build doesn't seem to work. If I navigate to the page I get a 404 error.
I've changed a lot of things and now developing should be much easier and images should be better.