-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
108 lines (102 loc) · 2.78 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: '3'
services:
mysql-prod:
image: mysql:5.7
container_name: mysql-prod
restart: always
ports:
- 3306:3306
volumes:
- ./conf/mysql/conf/mysqld.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf:ro
- ./conf/mysql/conf/timezone:/etc/timezone:ro
- ./data/data-prod:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
MYSQL_ROOT_PASSWORD: FeiDesk@2022
myredis:
image: redis:3.2
container_name: myredis
restart: always
ports:
- 6379:6379
gateway:
build:
context: ./template/web
dockerfile: Dockerfile
image: aioweb:v1.0
restart: always
container_name: gateway
hostname: gateway
privileged: true
user: root
entrypoint: ["/bin/sh","-c","/usr/bin/supervisord --nodaemon"]
ports:
- "80:80"
- "443:443"
links:
- goapp:myapi
extra_hosts:
- abc.com:127.0.0.1
volumes:
- /etc/localtime:/etc/localtime:ro
- ./conf/gateway/supervisord.d:/etc/supervisord.d
- ./conf/gateway/conf:/usr/local/openresty/nginx/conf
- ./www/my:/home/working/www/my
- ./www/myapi:/home/working/www/myapi
- ./data:/home/working/data
- ./data/logs/sys:/home/working/data/logs/sys
- ./data/logs/nginx:/home/working/data/logs/nginx
- ./data/logs/varlog:/var/log
- ./data/logs/varlog/supervisor:/var/log/supervisor
goapp:
build:
context: ./template/goapp
dockerfile: Dockerfile
image: aiogo:v1.0
restart: always
container_name: goapp
hostname: goapp
privileged: true
user: root
command: ["/bin/sh","-c","/usr/bin/supervisord --nodaemon"]
ports:
- 8888:8888
- 5735:5735
- 18320:18320/udp
- 18320:18320/tcp
- 18321:18321/udp
- 18321:18321/tcp
- 5740:5740/udp
- 5740:5740/tcp
- 5741:5741/udp
- 5741:5741/tcp
- 5841:5841/udp
- 5841:5841/tcp
- 6951:6951/udp
- 6951:6951/tcp
links:
- mysql-prod:mysql.mylocal.cn
- myredis:redis.mylocal.cn
depends_on:
- mysql-prod
- myredis
volumes:
- /etc/localtime:/etc/localtime:ro
- ./conf/goapp/supervisord.d:/etc/supervisord.d
- ./www:/home/working/www
- ./conf/goapp/deskmgr/config:/home/working/www/deskmgr/config
- ./conf/goapp/myapi/config:/home/working/www/myapi/config
- ./conf/goapp/myapi/resource:/home/working/www/myapi/resource
- ./data:/home/working/data
- ./data/logs/sys:/home/working/data/logs/sys
- ./data/logs/varlog:/var/log
- ./data/logs/varlog/supervisor:/var/log/supervisor
networks:
default:
driver: bridge
driver_opts:
com.docker.network.enable_ipv6: "true"
ipam:
driver: default
config:
- subnet: 192.168.61.0/24