From 26167adae88baac92dccca5246884e95f3c0ec65 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Wed, 7 Jun 2017 18:43:25 -0500 Subject: [PATCH] initial files --- .editorconfig | 8 ++++++++ .gitignore | 4 ++++ Dockerfile | 9 +++++++++ Makefile | 26 ++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 .editorconfig create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..690d7bed --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*.{js,py}] +charset = utf-8 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab diff --git a/.gitignore b/.gitignore index a4854bef..38943d8f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ Homestead.json # Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer .rocketeer/ + +*.iml +.idea +tmp/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..fabf4ec3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +# +# after launch run +# docker exec phpvms /usr/bin/mysql -uroot -e 'CREATE DATABASE phpvms' + +FROM nabeelio/docker-lemp:latest + +RUN mkdir -p /var/run/mysqld + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6f9e1818 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# +# +# Create the phpvms database if needed: +# docker exec phpvms /usr/bin/mysql -uroot -e 'CREATE DATABASE phpvms' + +CURR_PATH=$(shell pwd) + +help: + + +docker: + @mkdir -p $(CURR_PATH)/tmp/mysql + + -docker rm -f phpvms + docker build -t phpvms . + docker run --name=phpvms \ + -v $(CURR_PATH):/var/www/ \ + -v $(CURR_PATH)/tmp/mysql:/var/lib/mysql \ + -p 8080:80 \ + phpvms + +docker-clean: + -docker stop phpvms + -docker rm -rf phpvms + -rm core/local.config.php + -rm -rf tmp/mysql