Working docker-compose files for development

This commit is contained in:
Nabeel Shahzad
2019-05-10 18:40:07 -05:00
parent 2b45b9fd70
commit 5f0db96fc4
8 changed files with 87 additions and 4 deletions

39
docker-compose.yml Normal file
View File

@@ -0,0 +1,39 @@
---
version: '3'
services:
app:
build:
context: ./docker/php
environment:
DB_HOST: mysql
volumes:
- ./:/var/www
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
depends_on:
- mysql
nginx:
image: nginx:1.13.8
command: /bin/bash -c "exec nginx -g 'daemon off;'"
volumes:
- ./:/var/www
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
depends_on:
- app
mysql:
image: mysql:5.7.26
environment:
- MYSQL_DATABASE=phpvms
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
volumes:
- mysql-data:/var/lib/mysql
ports:
- 3306
volumes:
mysql-data: