forked from gtsigner/docker-lnmp-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-deploy.yml
67 lines (60 loc) · 1.51 KB
/
docker-deploy.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
60
61
62
63
64
65
66
67
version: '3.0'
services:
nginx:
image: nginx:1.13.3
volumes:
- ./app:/var/www/html
- ./dockerfiles/nginx/conf.d:/etc/nginx/conf.d:ro
- ./logs/nginx:/var/log/nginx
ports:
- "80:80"
deploy:
restart_policy:
condition: any
command: nginx -g 'daemon off;'
mysql-db:
image: mysql:5.7
volumes:
- ./data/mysql:/var/lib/mysql:rw
- ./logs/mysql:/var/lib/mysql-logs:rw
- ./dockerfiles/mysql/conf.d:/etc/mysql/conf.d:ro
environment:
MYSQL_ROOT_PASSWORD: zhaojun
MYSQL_DATABASE: lottery_api_sale
MYSQL_USER: zhaojun
MYSQL_PASSWORD: zhaojun
deploy:
restart_policy:
condition: any
command: "--character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci"
redis-db:
image: redis
volumes:
- ./data/redis:/data
deploy:
restart_policy:
condition: any
php-fpm:
image: zhaojunlike/php-fpm:5.6
volumes:
- ./app:/var/www/html:rw
- ./dockerfiles/php/php.ini:/usr/local/etc/php/php.ini:ro
- ./dockerfiles/php/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- ./logs/php-fpm:/var/log/php-fpm:rw
deploy:
restart_policy:
condition: any
command: php-fpm
##monti
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
volumes:
wwwroot:
driver: local