diff --git a/wordpress/unfinishedinstallation/README.md b/wordpress/unfinishedinstallation/README.md index 9755d1a3..c4396ead 100644 --- a/wordpress/unfinishedinstallation/README.md +++ b/wordpress/unfinishedinstallation/README.md @@ -1,7 +1,7 @@ # WordPress with exposed installation page This directory contains the deployment configs for a WordPress application where -the installation page is exposed. The service listens on port `80`. +the installation page is exposed. The internal service listens on port `80` and is exposed on `8081` by docker compose. This config deploys the following services: @@ -13,4 +13,10 @@ and the following storage: - `mysql-pv-claim`: File system required by MySql. - `pre-setup-wp-pv-claim`: File system required by WordPress. -Replace `${db_password}` with a password of your choice in wordpress.yaml \ No newline at end of file +Replace `${db_password}` with a password of your choice in wordpress.yaml + + +You can also use the docker-compose setup with +``` +docker compose up +``` \ No newline at end of file diff --git a/wordpress/unfinishedinstallation/docker-compose.yaml b/wordpress/unfinishedinstallation/docker-compose.yaml new file mode 100644 index 00000000..f6c81733 --- /dev/null +++ b/wordpress/unfinishedinstallation/docker-compose.yaml @@ -0,0 +1,33 @@ +version: "3.9" + +services: + wordpress: + image: wordpress + platform: linux/amd64 + container_name: wordpress + ports: + - "8081:80" + environment: + WORDPRESS_DB_HOST: mysql:3306 + WORDPRESS_DB_USER: wordpress + WORDPRESS_DB_PASSWORD: tsunami-notsecret-donotuse + WORDPRESS_DB_NAME: wordpress + depends_on: + mysql: + condition: service_healthy + restart: unless-stopped + + mysql: + image: mysql:5.7 + platform: linux/amd64 + container_name: mysql + environment: + MYSQL_ROOT_PASSWORD: tsunami-notsecret-donotuse + MYSQL_DATABASE: wordpress + MYSQL_USER: wordpress + MYSQL_PASSWORD: tsunami-notsecret-donotuse + restart: unless-stopped + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] + interval: 5s + retries: 10