- All container should be created in same network
we created same network "mynetwork" with bridge.
- Application container data should be persisted
we created volume for that like volumes: db-data: wordpress-data:
- Configurable fields should be passed as Environment variables
we created .env file and mention the version of apps
- Automatically restart if the container fails
we set policy for that restart: always
- configure minimum CPU and memory limits for containers
we set limit for CPU and memory deploy: resources: limits: cpus: '0.5' memory: 50M
- Choose light weighted image
we use alpine version of some image but not working proper because it doesnt have that binary
- Vulnerabilities in the image should be less
we created strong application security
using alpine image