-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.local.yml
47 lines (43 loc) · 1.01 KB
/
docker-compose.local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: "2"
services:
# The Application
app:
build:
context: .
dockerfile: Dockerfile.local
image: roerjo/php-esscents-app
container_name: php-esscents-app
working_dir: /var/www/app
links:
- database
volumes:
- .:/var/www/app
- php_esscents_phpsocket:/var/run
- ./php-fpm.conf:/usr/local/etc/php-fpm.d/zzz-php-fpm.conf
# The Web Server
nginx:
image: nginx:alpine
container_name: php-esscents-nginx
ports:
- "${APP_PORT}:80"
volumes_from:
- app
volumes:
- php_esscents_phpsocket:/var/run
- ./vhost.conf:/etc/nginx/conf.d/default.conf
links:
- app
# The Local Database
database:
image: mysql:5.7
container_name: php-esscents-database
volumes:
- php_esscents_database:/var/lib/mysql
environment:
- "MYSQL_DATABASE=${DB_DATABASE}"
- "MYSQL_ROOT_PASSWORD=${DB_PASSWORD}"
ports:
- "${EXTERNAL_DB_PORT}:3306"
volumes:
php_esscents_database:
php_esscents_phpsocket: