-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (53 loc) · 1.02 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
version: '2'
services:
nginx:
image: 'nginx:stable-alpine'
container_name: nginx
ports:
- 8001:8001
volumes:
- .:/var/www
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
restart: always
networks:
- web
labels:
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.basic.frontend.rule=Host:duty.ballfish.io"
- "traefik.basic.port=8001"
- "traefik.basic.protocol=http"
mysql:
image: 'mysql:5.7'
container_name: mysql
ports:
- 3306:3306
env_file: docker.env
volumes:
- dbdata:/var/lib/mysql/
- ./mysql/my.cnf:/etc/mysql/my.cnf
restart: always
networks:
- web
php:
build:
context: .
dockerfile: Dockerfile
container_name: on_duty
ports:
- 9000:9000
volumes:
- .:/var/www
depends_on:
- mysql
restart: always
networks:
- web
volumes:
dbdata:
driver: local
networks:
web:
external: true