Prepare your app for production

There are some differences between running your Docker containers in production compared to running in development on your local machine. You will likely need to make some changes to your app to prepare it for production. Most of these changes are needed when moving to any production environment, whether this is MedStack Control or another platform.

Note: MedStack Control does not currently support docker-compose and docker-stack files, but most of the functionality available in these files is available in the MedStack Control UI.

There are many resources and articles that cover this subject.

Optimizing your docker application

Docker's official documentation has the following recommendations for running your application on a production environment.

  1. Keep your images small. This will speed image download which is a key factor in deployment time.
  2. Switch from bind mounts to volumes. Bind mounts are convenient for development but are not available in production.
  3. Make use of secrets and configs.

For more information, see https://docs.docker.com/develop/dev-best-practices/.

Digital Ocean has an extensive guide on optimizing images for production. See https://www.digitalocean.com/community/tutorials/how-to-optimize-docker-images-for-production.

Other recommendations

Additionally to optimizing your docker application, we have some other recommendations for running a production application.

  • Select a private image registry for your project. For example, GitLab provides free private container registries. See https://docs.gitlab.com/ee/user/project/container_registry.html.
  • Select a method for versioning your Docker images. Open source projects commonly use Semver. See https://medium.com/@mccode/using-semantic-versioning-for-docker-image-tags-dfde8be06699.
  • Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

    Still need help? Submit a request for support Submit a request for support