PalisadoesFoundation / talawa-admin

Admin portal for the Talawa Mobile App. Click on the link below to see our documentation
https://docs.talawa.io/
GNU General Public License v3.0
142 stars 588 forks source link

Talawa-Admin Docker Support Issue #1075

Open duplixx opened 11 months ago

duplixx commented 11 months ago

Talawa-Admin Docker Support Issue:

Title: Adding Docker Support to Talawa-Admin

Description:

Problem: Talawa-Admin currently lacks Docker support, hindering its ease of deployment and scalability. Adding Docker support is essential to streamline the deployment process and make it more accessible to a broader audience.

Solution: Implementing Docker support for Talawa-Admin would involve creating a Dockerfile and configuration to package the application into a Docker container. This containerization would simplify deployment, improve consistency across environments, and enhance scalability.

Approach: To achieve Docker support for Talawa-Admin, we can follow these steps:

  1. Create a Dockerfile specifying the necessary dependencies and configuration.
  2. Configure the application to work seamlessly within a Docker container.
  3. Document the steps for building and running Talawa-Admin using Docker in the project's README.

Additional Context: Adding Docker support aligns with modern development practices, making it easier for developers to set up and run Talawa-Admin in various environments. Docker containers provide isolation, portability, and reproducibility, contributing to a more robust and user-friendly development and deployment experience.

Potential internship candidates Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

duplixx commented 11 months ago

Hey @palisadoes please assign me this issue. Thanks !!

noman2002 commented 11 months ago

@duplixx Do we even need docker on the admin? If yes, please explain why we need it.

duplixx commented 11 months ago

Hey @noman2002 , I strongly believe that integrating Docker into Talawa-Admin is essential. It effectively addresses significant challenges faced by developers and contributors.

In summary, leveraging Docker in Talawa-Admin significantly improves collaboration, consistency, and reduces common challenges associated with environment setups.

aashimawadhwa commented 11 months ago

@kb-0311 @beingnoble03 @DMills27 @EshaanAgg would like to hear your thoughts on this.

DMills27 commented 11 months ago

Docker is essentially being used as a stop gap, at the moment, until we can put in place a more sustainable means to achieve reproducibility. I propose we have a single Docker image that generates the API, Admin and Talawa Mobile Frontend. My reasoning is that it would incur additional complexity to create separate Docker images for these and then connect them; it is also inefficient in terms of computational resources that would be used.

palisadoes commented 11 months ago

@DMills27

  1. You mean API and the web Admin/User portal correct?
  2. How would we best approach this if we are using separate repos for the API and Admin?
aarishshahmohsin commented 11 months ago

I could make a dockerfile for Talawa-Admin. I there is a need, Please assign this issue to me.

duplixx commented 11 months ago

@DMills27

  1. You mean API and the web Admin/User portal correct?
  2. How would we best approach this if we are using separate repos for the API and Admin?

In my view we should follow this approach

1. Dockerfile for Each Component

2. Docker Compose for Multi-Container Setup

3. Service Orchestration

noman2002 commented 11 months ago

@DMills27 @palisadoes Is this issue required or should we close this for now ??

EshaanAgg commented 11 months ago

It would only make sense for this issue if we publish the Talawa-API as a docker image on DockerHub, and then use it to setup the admin via Compose. Otherwise there is no need for the same as of now IMO.

noman2002 commented 11 months ago

Thanks @EshaanAgg . Closing this for now.

palisadoes commented 11 months ago

@EshaanAgg As you spoke about publishing Talawa* on Docker Hub, should we reopen this issue?

EshaanAgg commented 11 months ago

We are yet to make a docker image for Talawa APi. It would be apt to reopen the same after it.

palisadoes commented 11 months ago

We are yet to make a docker image for Talawa APi. It would be apt to reopen the same after it.

The API got its docker instance created about 2 weeks ago. So we should reopen this issue.

Gmin2 commented 11 months ago

can i get assigned?

Gmin2 commented 10 months ago

@EshaanAgg @noman2002 is the talawa image is published on dockerhub i cant see it?

shankeleven commented 10 months ago

@palisadoes please assign this issue to me, would love to work

Devesh326 commented 10 months ago

@palisadoes can i work on this issue!

Devesh326 commented 10 months ago

Hey @aashimawadhwa and @palisadoes

I'm currently working on dockerizing Talawa Admin. To set up the Docker Compose file, I need the Docker image for Talawa API, but I couldn't find it anywhere.

Could you please guide me in the right direction or provide information about where I can obtain the Talawa API Docker image?

Thanks!

palisadoes commented 10 months ago
  1. You'll need to assume that the API is up and running.
  2. You will also need to update the setup script to accommodate the Docker support you'll be adding
Devesh326 commented 10 months ago

Okay, thanks!

Devesh326 commented 9 months ago
  1. You'll need to assume that the API is up and running.
  2. You will also need to update the setup script to accommodate the Docker support you'll be adding

Hi @palisadoes,

I have created a PR to add dockerization support for talawa admin. Will update the setup script once that pr is merged to avoid conflicts.

github-actions[bot] commented 9 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

palisadoes commented 9 months ago

Unassigning due to inactivity

varshith257 commented 9 months ago

@Cioppolo14 I would like to work on it

varshith257 commented 9 months ago

Reviewing the previously attempted work

varshith257 commented 8 months ago

@palisadoes @Cioppolo14 @noman2002 Can I raise an issue for potential improvements to Talawa-API's Docker support? It's mandatory for this issue and also i need to publish the Talawa-Api docker image on DockerHub.

varshith257 commented 8 months ago

It would only make sense for this issue if we publish the Talawa-API as a docker image on DockerHub, and then use it to setup the admin via Compose. Otherwise there is no need for the same as of now IMO.

This is what I intended to do

varshith257 commented 8 months ago

@palisadoes Can I have an update on this?

palisadoes commented 8 months ago

@palisadoes @Cioppolo14 @noman2002 Can I raise an issue for potential improvements to Talawa-API's Docker support? It's mandatory for this issue and also i need to publish the Talawa-Api docker image on DockerHub.

We already have a docker API issue

vasujain275 commented 8 months ago

@varshith257

  1. You only need to create a Dockerfile for Talawa-Admin in this issue.
  2. The Dockerfile should use multi-stage Docker builds so that it can have a small image size and be more efficient.
  3. Once the Dockerfile is merged, this issue will be closed, and we will need to raise a new issue to create a GitHub workflow to upload the Talawa Admin image to Docker Hub.
  4. Regarding the Talawa API Docker Image to Docker Hub, it has been worked on completely as I stated here.
  5. If you want, I can handle the Talawa API Multi-Staged Build if it's too overwhelming right now. You can focus on the Talawa Admin Docker Image only.
github-actions[bot] commented 8 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

vasujain275 commented 8 months ago

Can I work on this?

Cioppolo14 commented 8 months ago

Unassigning due to no activity or open PR.

varshith257 commented 8 months ago

@Cioppolo14 Waiting to upload the docker-api issue to be merged and to be upload to Docker-Hub as this issue is dependent on the Talawa-Api Docker image. As already same has been discussed in Talawa-Api for DockerHub Credentials

Can you please reassign me this issue?

Almost done with this work but waiting to be the PR of talawa-api docker issue to be merged and same to be uploaded to Docker-Hub

vasujain275 commented 8 months ago

@Cioppolo14 Waiting to upload the docker-api issue to be merged and to be upload to Docker-Hub as this issue is dependent on the Talawa-Api Docker image. As already same has been discussed in Talawa-Api for DockerHub Credentials

Can you please reassign me this issue?

Almost done with this work but waiting to be the PR of talawa-api docker issue to be merged and same to be uploaded to Docker-Hub

How is the docker hub talawa api related to the docker file of talawa admin? Correct me if I am wrong but in the discussions we had, we do not intend to upload the talawa admin docker image to the docker hub. I have started work on this too locally. I think this is independent of any talawa api pr being merged.

varshith257 commented 8 months ago

@palisadoes @Cioppolo14 @noman2002 Can I raise an issue for potential improvements to Talawa-API's Docker support? It's mandatory for this issue and also i need to publish the Talawa-Api docker image on DockerHub.

@Cioppolo14 Same has been stated before and Sorry not to be commented about progress of work. Just now came here to update about the progress of work but unassigned

varshith257 commented 8 months ago

It would only make sense for this issue if we publish the Talawa-API as a docker image on DockerHub, and then use it to setup the admin via Compose. Otherwise there is no need for the same as of now IMO.

@vasujain275 Same as above. Then how could we configure API service for talawa-admin without image of talawa-api importing here?

vasujain275 commented 8 months ago

It would only make sense for this issue if we publish the Talawa-API as a docker image on DockerHub, and then use it to setup the admin via Compose. Otherwise there is no need for the same as of now IMO.

@vasujain275 Same as above. Then how could we configure API service for talawa-admin without image of talawa-api importing here?

Why do we need talawa api image imported here, as this issue states we need a way for developers to locally run docker container of talawa admin for easy local devlopment. The API link will be provided by devloper setting this image locally only.

varshith257 commented 8 months ago

How can talawa-admin run without talawa-api running? The intention of docker support to talawa-admin is to setup admin from docker-compose and doesn't to rely on the talwa-api to be started locally it doesn't make any sense of it.

vasujain275 commented 8 months ago

@varshith257 As peter suggested we don't want to much integration of talawa api and talawa admin right now as they are very dynamic in nature and we came to conclusion to make them seprate docker instances. In future when talawa applications are less dynamic and stable we can move to a closer intergration. So, we decided on an 2 independent docker image for talawa admin one for multi-stage, light weight and one image for dev environment with code attached as volumes. Please refer to above disscussion in the pr for more contex. Refrence - https://github.com/PalisadoesFoundation/talawa-admin/issues/1075#issuecomment-1890738383

varshith257 commented 8 months ago

@palisadoes Can you please provide your suggestions here what exactly need to be added now just with docker support of talawa-admin and assume locally talawa-api is up.

If it is the case, done with the work and ready to raise a PR

OR

The same intended by @DMills27 and @EshaanAgg in above comments to support talawa admin- setup without again relying to up talwa-api manually

vasujain275 commented 8 months ago

@varshith257 You don't need to worry about your work being a waste. I was just talking about the approach we prefer right now for talawa admin docker image according to previous conversations. If you are ready with the pr there is no sense for me to work the same thing all over again

varshith257 commented 8 months ago

@palisadoes Can you please provide your suggestions here what exactly need to be added now just with docker support of talawa-admin and assume locally talawa-api is up.

If it is the case, done with the work and ready to raise a PR

OR

The same intended by @DMills27 and @EshaanAgg in above comments to support talawa admin- setup without again relying to up talwa-api manually

@palisadoes @Cioppolo14

palisadoes commented 8 months ago

Please work with @noman2002 on this

varshith257 commented 8 months ago

Please work with @noman2002 on this

Okay! @Cioppolo14 Can I get reassigned this issue?

vasujain275 commented 8 months ago

@varshith257 If you don't mind can I work on this? I have a good approach in mind, did some research about it too

varshith257 commented 8 months ago

@varshith257 If you don't mind can I work on this? I have a good approach in mind, did some research about it too

But I have already done with work when I got assigned this issue and worked it for a week. In thought API docker issue is dependent on this as intended by Eshaan I have waited the API docker image to be uploaded in Docker Hub.

Cioppolo14 commented 8 months ago

This is issue has a complicated assignment history. In the future, if you feel you are waiting for answers, please keep the issue active and/or track down answers in Slack so work can progress. I will not change the assignee right now.

vasujain275 commented 8 months ago

Here is the approach I am taking, commenting for refrence in future -

  1. I will create two docker files -
    • Dockerfile.dev for local development which also have code attached as volume for hot refresh feature.
    • Dockerfile.prod for production which uses multi stage docker files and serve pre build js files using final stage node:alpine image.
  2. Once these two are implemented I will docker compose for the respective dockerfiles.
  3. Then I will add npm script to package.json for npm run dx-dev an npm run dx-prod for easily startiing the containers.
  4. Finally, I will modify the Installation docs for the same.