worklenz icon indicating copy to clipboard operation
worklenz copied to clipboard

Refactor and code update for a working docker deployment

Open aperera opened this issue 1 year ago • 9 comments

Refactor and update to run worklenz-frontend in the docker environment.

  1. docker-compose.yml
  2. worklenz-frontend/package.json
  3. worklenz-frontend/Dockerfile

aperera avatar May 23 '24 06:05 aperera

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 23 '24 06:05 CLAassistant

Thanks @aperera for your contribution. We will review and merge.

kalinga777 avatar May 23 '24 10:05 kalinga777

I recommend #20 instead of this.

gdevenyi avatar May 23 '24 19:05 gdevenyi

  1. Moved .editorconfig to root Avoids confusion in settings.
  2. Enhanced Documentation Added DOCKER_SETUP.md for detailed Docker deployment instructions.
  3. Updated docker-compose.yml Supports latest changes.
  4. Upgraded Postgres to v16.3 Strengthened security and resolved v15.3 user authentication issue.
  5. Manual Database Migration Included process in DOCKER_SETUP.md and added PGAdmin for GUI management.
  6. Updated Dockerfiles Switched to Ubuntu:23.04 for both frontend and backend; production-ready and ease of troubleshooting.
  7. Updated 6_user-permission.sql Reflected new database settings.
  8. Minor Refactoring Additional settings and file updates.

These changes will help others to get up and running in a few minutes.

aperera avatar May 24 '24 04:05 aperera

This PR has huge non-isolated change which make it difficult to review, I suggest breaking it up to change only closely related things.

gdevenyi avatar May 24 '24 14:05 gdevenyi

@gdevenyi Besides the .editorconfig and package.json URL updates, everything else is required to get the Docker environment up and working. I included the documentation since I could not find a migration tool in the current packages, but feel free to break it down into multiple PRs.

aperera avatar May 24 '24 15:05 aperera

As per my PR, the changes are far less extensive to get the docker working. Only thing missing in mine is readme changes to change the databasename and password in the 6_usermanagement.sql

gdevenyi avatar May 24 '24 15:05 gdevenyi

backend_1   | 
backend_1   | > [email protected] start
backend_1   | > node ./build/bin/www
backend_1   | 
^Abackend_1   | /home/worklenz/worklenz/node_modules/passport-oauth2/lib/strategy.js:87
backend_1   |   if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); }
backend_1   |                            ^
backend_1   | 
backend_1   | TypeError: OAuth2Strategy requires a clientID option
backend_1   |     at Strategy.OAuth2Strategy (/home/worklenz/worklenz/node_modules/passport-oauth2/lib/strategy.js:87:34)
backend_1   |     at new Strategy (/home/worklenz/worklenz/node_modules/passport-google-oauth20/lib/strategy.js:52:18)
backend_1   |     at Object.<anonymous> (/home/worklenz/worklenz/build/passport/passport-strategies/passport-google.js:56:19)
backend_1   |     at Module._compile (node:internal/modules/cjs/loader:1469:14)
backend_1   |     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
backend_1   |     at Module.load (node:internal/modules/cjs/loader:1288:32)
backend_1   |     at Module._load (node:internal/modules/cjs/loader:1104:12)
backend_1   |     at Module.require (node:internal/modules/cjs/loader:1311:19)
backend_1   |     at require (node:internal/modules/helpers:179:18)
backend_1   |     at Object.<anonymous> (/home/worklenz/worklenz/build/passport/index.js:6:51)
backend_1   |     at Module._compile (node:internal/modules/cjs/loader:1469:14)
backend_1   |     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
backend_1   |     at Module.load (node:internal/modules/cjs/loader:1288:32)
backend_1   |     at Module._load (node:internal/modules/cjs/loader:1104:12)
backend_1   |     at Module.require (node:internal/modules/cjs/loader:1311:19)
backend_1   |     at require (node:internal/modules/helpers:179:18)

yonas avatar Feb 22 '25 20:02 yonas

@danushkak please review and confirm

kalinga777 avatar Feb 23 '25 14:02 kalinga777