diff --git a/docker-compose-wp.yml b/docker-compose-wp.yml new file mode 100644 index 0000000..46ee637 --- /dev/null +++ b/docker-compose-wp.yml @@ -0,0 +1,33 @@ +version: "3" +services: + db: + image: mariadb:lts + expose: + - "3306" + env_file: + - envs/db + volumes: + - ./data/db:/var/lib/mysql/ + networks: + webnet: + aliases: + - dbsrv + + frontend: + image: php:8.2-wp + build: frontend + expose: + - "80" + ports: + - "80:80" + volumes: + - ./data/htdocs:/var/www/html/ + networks: + webnet: + aliases: + - www + depends_on: + - db + +networks: + webnet: \ No newline at end of file diff --git a/envs/db b/envs/db new file mode 100644 index 0000000..51ac5fb --- /dev/null +++ b/envs/db @@ -0,0 +1,4 @@ +MARIADB_DATABASE = mywebsitedb +MARIADB_USER = wpuser +MARIADB_PASSWORD = Xb65t6PwyttpamRd +MARIADB_ROOT_PASSWORD = t4mh59DWdnCh9ecVECvs69Q4M8Ssk6a6 \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..e7eac14 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,8 @@ +FROM php:8.2-apache +RUN apt update +RUN apt install -y \ + zlib1g-dev \ + libpng-dev +RUN docker-php-ext-install \ + gd \ + mysqli \ No newline at end of file