osscameroon / onacut

Onacut is web application that notifies users of electricity, water or internet outage in their location
14 stars 12 forks source link

Docker #91

Closed Zaker237 closed 2 years ago

Zaker237 commented 2 years ago

This Pr dockerise the dev environment so that we can start the whole app(front end and backen just by start one comment).

its help avoiding probleme with node/python version when the different dev have differents node/python version of their computer

Zaker237 commented 2 years ago

The backend part is already okay but a get this error when from the frontend

yarn run v1.22.17
$ craco start
onacut_frontend_dev    | (node:39) UnhandledPromiseRejectionWarning: Error: Cannot find module 'tailwindcss'
onacut_frontend_dev    | Require stack:
onacut_frontend_dev    | - /app/craco.config.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/node_modules/cosmiconfig/dist/loaders.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/node_modules/cosmiconfig/dist/ExplorerBase.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/node_modules/cosmiconfig/dist/Explorer.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/node_modules/cosmiconfig/dist/index.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/lib/config.js
onacut_frontend_dev    | - /usr/local/share/.config/yarn/global/node_modules/@craco/craco/scripts/start.js
onacut_frontend_dev    |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
onacut_frontend_dev    |     at Function.Module._load (internal/modules/cjs/loader.js:667:27)
onacut_frontend_dev    |     at Module.require (internal/modules/cjs/loader.js:887:19)
onacut_frontend_dev    |     at require (internal/modules/cjs/helpers.js:74:18)
onacut_frontend_dev    |     at Object.<anonymous> (/app/craco.config.js:5:9)
onacut_frontend_dev    |     at Module._compile (internal/modules/cjs/loader.js:999:30)
onacut_frontend_dev    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
onacut_frontend_dev    |     at Module.load (internal/modules/cjs/loader.js:863:32)
onacut_frontend_dev    |     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
onacut_frontend_dev    |     at Module.require (internal/modules/cjs/loader.js:887:19)
onacut_frontend_dev    | (node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
onacut_frontend_dev    | (node:39) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 0.83s.
onacut_frontend_dev exited with code 0
Zaker237 commented 2 years ago

this command is the one to use to start it

docker-compose -f docker-compose-dev.yml up --build
Asam237 commented 2 years ago

fix here => #94