Sunbird-RC / community

Repo to enable discussions, issue tracking & documentation for the Sunbird-RC projects
MIT License
12 stars 23 forks source link

Frontend deployment by docker for Issuance Portal #811

Open Pratikshakhandagale opened 1 year ago

Pratikshakhandagale commented 1 year ago

Currently, we have to manually deploy the latest code changes to the site. This involves first building the production files and then pushing them to the /var/www/html location.

This feature help us,,

Sreejit-K commented 12 months ago

@Pratikshakhandagale can you add more details and context here. So that it would help me start workin go on this ticket.

Pratikshakhandagale commented 12 months ago

updated story @Sreejit-K

Sreejit-K commented 7 months ago

Hi @srprasanna @holashchand

There is a breaking change introduced in docker compose 2.21. Due to which registry CLI needs a few fixes while fetching the status of the containers. More details on the issue are attached here -

https://github.com/docker/compose/issues/10958

https://github.com/docker/compose/pull/10918

Problem: Registry CLI uses'docker compose ps --format json'system command to fetch the status of the containers and then take actions accordingly. The release notes for 2.21.0 state "Changed docker compose ps and docker compose ps --format=json output to align with Docker CLI."

However, in prior versions, the result was a valid JSON array. 2.21.0 returns individual objects, one after the other, with no [ … ] wrapper. This doesn't seem to be valid JSON.

This is being implemented to execute various commands like registry status, registry down, registry restart and registry init.

Solution:

Found a node library which could replicate the same functionality - https://github.com/apocas/dockerode. I have tested it, its working fine and replicating the same flow . This would make the reigstry CLI compatible with any version of the docker. Wanted your comments before moving ahead with this implementation.

Sreejit-K commented 7 months ago

https://github.com/Sunbird-RC/sunbird-rc-issuance-ui/pull/24. Workflow using the Github actions of creating and uploading it to ghcr is pending @srprasanna