forked from haobeiping/tiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.26 KB
/
docker-compose.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
48
49
50
51
52
53
54
55
56
57
58
59
version: "3"
services:
backend_dev:
container_name: ${APP_NAME}_backend
build:
context: ./
dockerfile: Dockerfile
volumes:
- ./storage:/var/www/storage
links:
- mysql
depends_on:
- mysql
environment:
- DB_DATABASE=${DB_DATABASE}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- DB_CONNECTION=${DB_CONNECTION}
- DB_HOST=${DB_HOST}
mysql:
image: mysql:5.7
#volumes:
# - ./data/mysql/data:/var/lib/mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=true
nginx:
container_name: ${APP_NAME}_nginx
build:
context: ./deploy/nginx
args:
- PHP_UPSTREAM_CONTAINER=backend_dev
links:
- backend_dev
ports:
- "8080:80"
volumes:
- ./:/var/www:ro
- ./deploy/nginx/sites-available/:/etc/nginx/sites-available/
depends_on:
- backend_dev
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8081:80"
environment:
- PMA_ARBITRARY=1
- PMA_HOST=mysql
- PMA_USER=${DB_USERNAME}
- PMA_PASSWORD=${DB_PASSWORD}
links:
- mysql
depends_on:
- mysql