forked from gwolfxiao/1024tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.14 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:
#Nginx Service
web:
image: nginx:1.15-alpine
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
ports:
- "80:80"
volumes:
- ./:/var/www
- ./.docker/nginx/:/etc/nginx/conf.d/
networks:
- overlay
#PHP Service
php:
image: 1024tools_php
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
environment:
SERVICE_NAME: php
SERVICE_TAGS: dev
volumes:
- ./:/var/www
networks:
- overlay
#MySQL Service
mysql:
image: mysql:5.7
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
restart_policy:
condition: on-failure
environment:
MYSQL_DATABASE: tools
MYSQL_ROOT_PASSWORD: 123456
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./.docker/mysql/data:/var/lib/mysql/
- ./.docker/mysql/init.sql://tmp/init.sql
networks:
- overlay
#Docker Networks
networks:
overlay: