From d6c33313efdb6dac4b897bea31806773b6af2837 Mon Sep 17 00:00:00 2001 From: Jose Miguel Lopez Coronado Date: Tue, 4 Aug 2020 13:34:32 +0200 Subject: [PATCH] Created basic profile files --- basic/.env_default | 7 +++++++ basic/README.md | 8 ++++++++ basic/docker-compose.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 basic/.env_default create mode 100644 basic/README.md create mode 100644 basic/docker-compose.yml diff --git a/basic/.env_default b/basic/.env_default new file mode 100644 index 0000000..0374f7d --- /dev/null +++ b/basic/.env_default @@ -0,0 +1,7 @@ +$CONTAINER_NAME=TheNameOfYourContainer +MYSQL_ROOT_PASSWORD=YourMySQLRootPasswordHere +MYSQL_USER=wpuser +MYSQL_PASSWORD=The_wpuser_password_here +MYSQL_WP_DATABASE=wordpressdb +EX_PORT=8000 + diff --git a/basic/README.md b/basic/README.md new file mode 100644 index 0000000..b1aa057 --- /dev/null +++ b/basic/README.md @@ -0,0 +1,8 @@ +INSTRUCTIONS + +1. Copy (and edit) .env_default to .env +2. Run docker-compose +3. Access the system in hostname:$EX_PORT +4. Follow the system instructions to install WP +5. Have fun! + diff --git a/basic/docker-compose.yml b/basic/docker-compose.yml new file mode 100644 index 0000000..5dd9dc8 --- /dev/null +++ b/basic/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3' + +services: + db: + image: mysql:8.0 + container_name: $CONTAINER_NAME_db + restart: unless-stopped + env_file: .env + environment: + - MYSQL_DATABASE=$MYSQL_WP_DATABASE + volumes: + - ./dbdata:/var/lib/mysql + command: '--default-authentication-plugin=mysql_native_password' + + wordpress: + depends_on: + - db + image: wordpress + container_name: $CONTAINER_NAME_wp + restart: unless-stopped + env_file: .env + ports: + - $EX_PORT:80 + environment: + - WORDPRESS_DB_HOST=db:3306 + - WORDPRESS_DB_USER=$MYSQL_USER + - WORDPRESS_DB_PASSWORD=$MYSQL_PASSWORD + - WORDPRESS_DB_NAME=$MYSQL_WP_DATABASE + volumes: + - ./wordpress:/var/www/html +