From 495047c78c335e3fd358edc432b3cc7bd814c604 Mon Sep 17 00:00:00 2001 From: petrkucerak Date: Fri, 6 Dec 2024 11:38:28 +0100 Subject: [PATCH] Create docker configuration for local development --- README.md | 6 ++++++ docker-compose.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 2edf46f..b14a734 100755 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ Wordpress theme of the STC blog [studuj.digital](https://studuj.digital/). ## About project Based on [STCblog template](https://github.com/andreondra/stcblog). +## Local development + +```sh +docker-compose -p stcblog up --build # Build and run dev version in docker image +``` + ## Features ### Responsive ![responsivity showcase](docs/img/readme1.gif) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..46ba051 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +version: '3.8' +services: + wordpress: + image: wordpress:6.7.1 + container_name: wordpress-dev + ports: + - "8080:80" + environment: + WORDPRESS_DB_HOST: db + WORDPRESS_DB_USER: exampleuser + WORDPRESS_DB_PASSWORD: examplepass + WORDPRESS_DB_NAME: exampledb + volumes: + - ./:/var/www/html/wp-content/themes/current-theme + + db: + image: mysql:8.0 + container_name: wordpress-db + environment: + MYSQL_DATABASE: exampledb + MYSQL_USER: exampleuser + MYSQL_PASSWORD: examplepass + MYSQL_RANDOM_ROOT_PASSWORD: '1' + volumes: + - db:/var/lib/mysql + +volumes: + db: