diff --git a/docker-compose.yml b/docker-compose.yml index ba34e27..874f3d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,31 @@ version: "3.8" services: - wordpress: \ No newline at end of file + wordpress: + image: wordpress:latest + container_name: wordpress_frontend + restart: always + ports: + - 80:80 + depends_on: + - mysql + environment: + - WORDPRESS_DB_HOST=mysql + - WORDPRESS_DB_USER=mysql + - WORDPRESS_DB_PASSWORD=mysql + - WORDPRESS_DB_NAME=wordpress + - WORDPRESS_TABLE_PREFIX=ezcompose_ + volumes: + - ./mysql:/var/www/html + mysql: + image: mysql:latest + container_name: mysql + restart: always + ports: + - 3306:3306 + environment: + - MYSQL_DATABASE=wordpress + - MYSQL_USER=mysql + - MYSQL_PASSWORD=mysql + - MYSQL_ROOT_PASSWORD=mysql + volumes: + - .:/var/lib/mysql \ No newline at end of file