From dbbd6a57b2b6dc41e882089d2b031fcec07433a3 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Mon, 12 Feb 2024 21:32:00 +0000 Subject: [PATCH] Dateien nach "install-wordpress-on-docker" hochladen --- .../docker-compose.yml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 install-wordpress-on-docker/docker-compose.yml diff --git a/install-wordpress-on-docker/docker-compose.yml b/install-wordpress-on-docker/docker-compose.yml new file mode 100644 index 0000000..83d8a87 --- /dev/null +++ b/install-wordpress-on-docker/docker-compose.yml @@ -0,0 +1,51 @@ +version: "3" # Specifies the version of the Docker Compose file format + +# Service definitions for the wordpress application +services: + # Service definition for the main application + app: + # Docker image to use for the application + image: wordpress:latest + # Port mapping for the application + ports: + - 8080:80 + # Environment variables for the application + environment: + WORDPRESS_DB_HOST: db + WORDPRESS_DB_USER: dockge + WORDPRESS_DB_PASSWORD: dockge + WORDPRESS_DB_NAME: wordpress + # Volume mapping for the application + volumes: + - wordpress_data:/var/www/html + # Service dependencies for the application + depends_on: + - db + networks: + - wordpress-network + + # Service definition for the database + db: + # Docker image to use for the database + image: mysql:5.7 + # Environment variables for the database + environment: + MYSQL_DATABASE: wordpress + MYSQL_USER: dockge + MYSQL_PASSWORD: dockge + MYSQL_ROOT_PASSWORD: dockge + # Volume mapping for the database + volumes: + - wordpress_db_data:/var/lib/mysql + networks: + - wordpress-network + +# Network definitions for the wordpress application +networks: + wordpress-network: + driver: bridge + +# Volume definitions for the wordpress application +volumes: + wordpress_data: + wordpress_db_data: