tasking-manager icon indicating copy to clipboard operation
tasking-manager copied to clipboard

Update docker dev setup and docs

Open mahesh-naxa opened this issue 11 months ago • 2 comments

What this covers?

  • [x] Tasking manager db, backend and frontend services works from docker compose up -d --build without any hassles. closes #5997
  • [x] docker-compose.override.yml is replaced with docker-compose.override.sample.yml which can be used to override any ports, volume mounts or other docker compose config. docker-compose.override.yml is now untracked through .gitignore. This should allow people to have their own setup. closes #6183 & closes #6232
  • [x] Updates to development setup docs.
  • [x] Frontend or Backend service can be independently spawned. Also added docs for it.

What it Doesn't?

  • [ ] Existing Dockerfile has issues (optimization, build flow, security & optimizations) that's untouched.
  • [ ] ghcr.io/hotosm/tasking-manager/backend:xxxx image name is used for name sake only. No workflow or image exists.
  • [ ] Swagger support is tested by rebasing work by @kshitijrajsharma . https://github.com/hotosm/tasking-manager/tree/feature/swagger-ui-api . It works with TM_APP_API_URL set.

mahesh-naxa avatar Feb 28 '24 10:02 mahesh-naxa

I get this error with this PR:

tm-migration-1 | PermissionError: [Errno 13] Permission denied: 'logs' service "tm-migration" didn't complete successfully: exit 1

robsavoye avatar Mar 06 '24 14:03 robsavoye

Part of my problem turned out to be related to the version of docker-compose. With the new version, this branch is much closer to working. The front end comes up, but the backend fails with this message: tm-db-1 | 2024-03-12 04:09:27.604 UTC [181] FATAL: role "-d" does not exist

robsavoye avatar Mar 12 '24 04:03 robsavoye

This PR adds a workflow for building docker images in the GH container registry: https://github.com/hotosm/tasking-manager/pull/6272

dakotabenjamin avatar Mar 12 '24 19:03 dakotabenjamin

Since I approved the PR that got swagger working, does this need to be updated to work with that ?

robsavoye avatar Mar 14 '24 05:03 robsavoye

I get this now when testing this PR.

338.4 npm ERR! path /usr/src/app/node_modules/@sentry/cli 338.4 npm ERR! command failed 338.4 npm ERR! command sh -c -- node ./scripts/install.js 338.4 npm ERR! [sentry-cli] Downloading from https://downloads.sentry-cdn.com/sentry-cli/2.21.1/sentry-cli-Linux-x86_64 338.4 npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/sentry-cli' 338.4 338.4 npm ERR! A complete log of this run can be found in: 338.4 npm ERR! /root/.npm/_logs/2024-03-14T07_30_22_362Z-debug-0.log

robsavoye avatar Mar 14 '24 07:03 robsavoye

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 15 '24 09:03 sonarqubecloud[bot]

@robsavoye can you merge this. I will cover issues with dockerfile (sonarcloud) in a seperate PR.

mahesh-naxa avatar Mar 19 '24 03:03 mahesh-naxa