From b0170105ccee5691477edf28eebd307d898cdf01 Mon Sep 17 00:00:00 2001 From: Vladislav Abrashkin Date: Sun, 10 May 2020 14:31:46 +0300 Subject: [PATCH] start for simple start --- .env | 7 ------ .env.example | 2 ++ .gitignore | 3 ++- docker-compose.example.yml | 18 ++++++++++++++ docker-compose.yml | 26 -------------------- public/index.php | 4 --- volumes/php/conf.d/docker-php-ext-xdebug.ini | 5 ++++ 7 files changed, 27 insertions(+), 38 deletions(-) delete mode 100644 .env create mode 100644 .env.example create mode 100644 docker-compose.example.yml delete mode 100644 docker-compose.yml delete mode 100644 public/index.php create mode 100644 volumes/php/conf.d/docker-php-ext-xdebug.ini diff --git a/.env b/.env deleted file mode 100644 index 1b4d93d..0000000 --- a/.env +++ /dev/null @@ -1,7 +0,0 @@ -APP_NAME=rbcparser -MYSQL_PORT=3307 -NGINX_PORT=88 -DATABASE_USER=root -DATABASE_NAME=rbc -DATABASE_PASSWORD=root -DATABASE_HOST=mysql \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..856dd00 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +APP_NAME=appname +NGINX_PORT=88 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 462312d..6ab5c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea -volumes/mysql \ No newline at end of file +docker-compose.yml +.env \ No newline at end of file diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..e3d6388 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,18 @@ +version: '3' +services: + nginx: + image: nginx:alpine + container_name: ${APP_NAME}_nginx + ports: + - ${NGINX_PORT}:80 + volumes: + - ./volumes/nginx/default.conf:/etc/nginx/conf.d/default.conf:cached + - ./:/var/www/html:cached + php: + user: 1000:www-data + image: dvlpm/php7.4-dev:latest + volumes: + - ./:/var/www/html + - ./volumes/php/conf.d/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + environment: + XDEBUG_CONFIG: remote_host=192.168.99.1 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index cafaa11..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: '3' -services: - nginx: - image: nginx:alpine - container_name: ${APP_NAME}_nginx - ports: - - ${NGINX_PORT}:80 - volumes: - - ./volumes/nginx/default.conf:/etc/nginx/conf.d/default.conf:cached - - ./:/var/www/html:cached - php: - image: php:7.4-fpm - container_name: ${APP_NAME}_php - volumes: - - ./:/var/www/html:cached - mysql: - image: mysql:8 - container_name: ${APP_NAME}_mysql - ports: - - ${MYSQL_PORT}:3306 - volumes: - - ./volumes/mysql:/var/lib/mysql:cached - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_DATABASE=${DATABASE_NAME} - - MYSQL_ROOT_PASSWORD=${DATABASE_PASSWORD} diff --git a/public/index.php b/public/index.php deleted file mode 100644 index a66ff32..0000000 --- a/public/index.php +++ /dev/null @@ -1,4 +0,0 @@ -