Difference between development and production Docker? #13
-
Question from @HsienLu I am a developer from National Taiwan University of Science and Technology. Thank you for providing such a wonderful open platform. We are planning to use this platform as one of the tools for our research project. However, I have two questions that I would like to consult with you: In your README, there are two versions: a development version and a production version. Could you kindly explain the difference between the two and why this distinction is necessary? Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi HsienLu, Welcome to the forum, and thanks for using WISE. We're excited to hear that you are planning to use the platform for your research project. Differences between the two versions of DockerWe use the WISE-Docker-Dev repo for developing WISE locally, as you know. The Docker containers that are referenced in WISE-Docker-Dev/docker-compose.yml use the wise-client-dev and wise-api-dev Docker images, which contain tools to watch for changes and compile the codebase. WISE-Docker-Server is used to deploy pre-built WISE Docker images on a server that is running Docker. When we make a release for WISE-Client or WISE-API on GitHub, we build and publish a Docker image (using GitHub actions, for example here: https://github.com/WISE-Community/WISE-Client/actions/workflows/publish-docker-image-prod.yml). This image contains the production-ready artifacts (static files for WISE-Client, and a WAR file for WISE-API), and does not contain devtools to watch/compile code. Deploying your own WISE instanceAs described on our README, there are two options for deploying WISE: 1) using Docker, and 2) not using Docker. Option 1: using DockerThis option requires you to build your own Docker image(s), publish them (on somewhere like https://hub.docker.com) and reference them in WISE-Docker-Server/docker-compose.yml If you set up your GitHub repo to build Docker images on release (e.g., using GitHub actions) and configure DockerHub credentials so that the images can be published there, then you just need to edit the docker-compose.yml file and you should be good to go. Option 2: not using DockerYou'd be following the instructions on this page: https://github.com/WISE-Community/.github/wiki/How-to-set-up-WISE-on-your-production-server Basically, this option requires you to
I hope this helps. Let me know if you have any questions! Hiroki |
Beta Was this translation helpful? Give feedback.
-
Hi Hiroki, Thank you for your clear explanation. We are planning to use Docker for development, as it seems to be both quick and convenient. From my understanding, for local development, I would package the modified wise-client and wise-api folders into Docker images and then reference these images when deploying to the production version. This would handle both deployment and updates. Is my understanding correct, or is there anything I might have misunderstood? Thank you again for your assistance! Best regards, |
Beta Was this translation helpful? Give feedback.
-
Yes, your understanding is correct. The easiest is to clone the repos and enable the GitHub actions to build and push the Docker images to DockerHub when new code is committed to the repos. This is what we do. Alternatively, you can manually build the Docker images locally and import them to your server. Let me know if you have any more questions. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I will try this workflow, and I will keep you updated on the results. Thank you again! |
Beta Was this translation helpful? Give feedback.
-
I'm sharing two issues I encountered and their solutions while setting up a local development environment using Docker Compose on a "Windows 10." Issue 1 sh: /bin/bash^M: bad interpreter: No such file or directory
Issue 2 "PWD" variable not set
|
Beta Was this translation helpful? Give feedback.
Hi HsienLu,
Welcome to the forum, and thanks for using WISE. We're excited to hear that you are planning to use the platform for your research project.
Differences between the two versions of Docker
We use the WISE-Docker-Dev repo for developing WISE locally, as you know. The Docker containers that are referenced in WISE-Docker-Dev/docker-compose.yml use the wise-client-dev and wise-api-dev Docker images, which contain tools to watch for changes and compile the codebase.
WISE-Docker-Server is used to deploy pre-built WISE Docker images on a server that is running Docker. When we make a release for WISE-Client or WISE-API on GitHub, we build and publish a Docker image (using GitHub actions…