Demo: Deploying Simple Micsoservices With Docker Compose
- Create the project directory #mkdir simple-wordpress -Install docker compose #yum -y install docker-compose -Create the following compose file as "docker-compose.yml" version: '2' ---> compose file format version services: ---> defining one or multiple services definition db: image: mysql:5.7 ---> image to be run by the service volumes: - db_data: var/lib/mysql --> volume to be used by services restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress web: --->service name ...