forked from BretFisher/php-docker-good-defaults
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.89 KB
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
48
49
50
51
52
53
54
version: '3.3'
services:
php:
# note you need to manually build this image from base dockerfile above FIRST!
image: yourdockername/base-php-nginx
build: .
volumes:
# used delegated mode here on docker for mac for faster disk I/O
- .:/var/www/app:delegated
- ./supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/nginx-site.conf:/etc/nginx/conf.d/default.conf
# mount in dev certs if you want to dev over ssl
#- ./dev-cert.crt:/etc/nginx/ssl/cert.crt
#- ./dev-key.pem:/etc/nginx/ssl/key.pem
entrypoint: /usr/local/bin/docker-php-entrypoint-dev
command: ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
ports:
- "8080:80"
- "8443:443"
- "9001:9001"
depends_on:
- mysql
environment:
APP_NAME: Laravel
APP_ENV: local
APP_DEBUG: "true"
APP_KEY: KEYGOESHERE
APP_LOG: errorlog
APP_URL: "http://localhost"
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: homestead
DB_USERNAME: homestead
DB_PASSWORD: secret
mysql:
image: mysql:5.7
volumes:
- mysql:/var/lib/mysql
ports:
# we only expose this port in local dev for using mysql tools/guis on your host
- "3306:3306"
environment:
MYSQL_DATABASE: ${DB_DATABASE:-homestead}
MYSQL_USER: ${DB_USERNAME:-homestead}
MYSQL_PASSWORD: ${DB_PASSWORD:-secret}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-secret}
# using this named volume ensures db's hang around between "up's"
volumes:
mysql: