diff --git a/examples/custom-subfolder/apps/app1.website.com/web-files/index.php b/examples/multisite-custom-subfolders/apps/app1.website.com/web-files/index.php similarity index 100% rename from examples/custom-subfolder/apps/app1.website.com/web-files/index.php rename to examples/multisite-custom-subfolders/apps/app1.website.com/web-files/index.php diff --git a/examples/custom-subfolder/apps/app2.website.com/web-files/index.php b/examples/multisite-custom-subfolders/apps/app2.website.com/index.php similarity index 100% rename from examples/custom-subfolder/apps/app2.website.com/web-files/index.php rename to examples/multisite-custom-subfolders/apps/app2.website.com/index.php diff --git a/examples/multisite-custom-subfolders/apps/app3.website.com/Dockerfile b/examples/multisite-custom-subfolders/apps/app3.website.com/Dockerfile new file mode 100644 index 0000000..c699b83 --- /dev/null +++ b/examples/multisite-custom-subfolders/apps/app3.website.com/Dockerfile @@ -0,0 +1,9 @@ +FROM php:fpm + +COPY docker-php-entrypoint /usr/local/bin/ +RUN chmod +x /usr/local/bin/docker-php-entrypoint + +ENTRYPOINT ["/usr/local/bin/docker-php-entrypoint"] + +EXPOSE 9000 +CMD ["php-fpm"] \ No newline at end of file diff --git a/examples/custom-subfolder/apps/app3.website.com/another-folder/index.php b/examples/multisite-custom-subfolders/apps/app3.website.com/another-folder/index.php similarity index 100% rename from examples/custom-subfolder/apps/app3.website.com/another-folder/index.php rename to examples/multisite-custom-subfolders/apps/app3.website.com/another-folder/index.php diff --git a/examples/multisite-custom-subfolders/apps/app3.website.com/docker-php-entrypoint b/examples/multisite-custom-subfolders/apps/app3.website.com/docker-php-entrypoint new file mode 100644 index 0000000..79be5a8 --- /dev/null +++ b/examples/multisite-custom-subfolders/apps/app3.website.com/docker-php-entrypoint @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "[*] my-php started" +exec "$@" \ No newline at end of file diff --git a/examples/custom-subfolder/docker-compose.yml b/examples/multisite-custom-subfolders/docker-compose.yml similarity index 57% rename from examples/custom-subfolder/docker-compose.yml rename to examples/multisite-custom-subfolders/docker-compose.yml index a2da3b8..014b875 100644 --- a/examples/custom-subfolder/docker-compose.yml +++ b/examples/multisite-custom-subfolders/docker-compose.yml @@ -24,6 +24,7 @@ services: - app1.website.com_REMOTE_PHP_PATH=/var/www/html - app2.website.com_REMOTE_PHP=app2 - app2.website.com_REMOTE_PHP_PATH=/var/www/html + - app2.website.com_ROOT_SITE_SUBFOLDER= # no subfolder - app3.website.com_REMOTE_PHP=app3 - app3.website.com_REMOTE_PHP_PATH=/var/www/html - app3.website.com_ROOT_SITE_SUBFOLDER=another-folder @@ -32,16 +33,28 @@ services: image: php:fpm restart: always volumes: - - ./apps/app1.website.com/web-files:/var/www/html + - ./apps/app1.website.com/web-files:/var/www/html # app1 project web root + + app1_db: + image: mariadb + restart: always + volumes: + - ./apps/app1.website.com/db-data:/var/lib/mysql # app1 project data + environment: + - MYSQL_ROOT_PASSWORD=db-root-pwd # replace with a stronger password + - MYSQL_DATABASE=app + - MYSQL_USER=user + - MYSQL_PASSWORD=db-user-pwd # replace with a stronger password app2: image: php:fpm restart: always volumes: - - ./apps/app2.website.com/web-files:/var/www/html + - ./apps/app2.website.com:/var/www/html # app2 project with no subfolder app3: - image: php:fpm + build: apps/app3.website.com/. # project with custom built image + image: my-php restart: always volumes: - - ./apps/app3.website.com/another-folder:/var/www/html + - ./apps/app3.website.com/another-folder:/var/www/html # app3 project web root