Articles → DOCKER → Docker Compose
Docker Compose
Purpose
Install Docker
Install Docker-Compose
sudo apt install docker-compose
Docker-Compose.Yml
version: '3'
services:
nginx:
image: nginx:latest
container_name: my_nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./apps:/etc/nginx/apps:ro
restart: always
Run The Complete Application
Output
--Scale Option
version: '3'
services:
nginx:
image: nginx:latest
container_name: my_nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./apps:/etc/nginx/apps:ro
restart: always
docker-compose up --scale nginx=3