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.
- Keep your images small. This will speed image download which is a key factor in deployment time.
- Switch from bind mounts to volumes. Bind mounts are convenient for development but are not available in production.
- 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.
Additionally to optimizing your docker application, we have some other recommendations for running a production application.