From 9e006af076d9a3910da070c3b66e2d9f28b9d933 Mon Sep 17 00:00:00 2001 From: Vladislav Abrashkin Date: Tue, 10 Mar 2020 19:30:44 +0300 Subject: [PATCH] init --- .env | 7 +++++++ .gitignore | 2 ++ docker-compose.yml | 26 ++++++++++++++++++++++++++ public/index.php | 4 ++++ volumes/nginx/default.conf | 28 ++++++++++++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 public/index.php create mode 100644 volumes/nginx/default.conf diff --git a/.env b/.env new file mode 100644 index 0000000..1b4d93d --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +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/.gitignore b/.gitignore new file mode 100644 index 0000000..462312d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +volumes/mysql \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cafaa11 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +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 new file mode 100644 index 0000000..a66ff32 --- /dev/null +++ b/public/index.php @@ -0,0 +1,4 @@ +