/
docker-compose.yml
160 lines (151 loc) · 4.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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# depends on 决定服务之间的启动顺序
version: '2.1'
services:
rabbitmq:
image: rabbitmq:latest
hostname: rabbitmqhost
restart: always
container_name: lg_rabbitmq
volumes:
- "./localtime:/etc/localtime"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "5672:5672"
- "15672:15672"
logging:
options:
max-size: "50m"
# postgres:
# image: postgres:9.6
# hostname: postgreshost
# restart: always
# container_name: lg_postgres
# ports:
# - "5432:5432"
# volumes:
# - "./localtime:/etc/localtime"
# - /tmp/lighway_db_23:/var/lib/postgresql/data
## - ./postgresql.conf:/var/lib/postgresql/data/lightway/postgresql.conf
## - /Users/screwman/Docker/lightway-autofetch-v0.2/lightway_config/postgresql.conf:/etc/postgresql/postgresql.conf
## command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
## command: -c 'shared_buffers=256MB' -c 'max_connections=200'
# environment:
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=postgres
# - POSTGRES_DB=postgres
# - PGDATA=/var/lib/postgresql/data/postgres
# logging:
# options:
# max-size: "50m"
redis:
image: redis:latest
hostname: redishost
restart: always
container_name: lg_redis
volumes:
- "./localtime:/etc/localtime"
- /tmp/redis_23:/data
ports:
- "6379:6379"
logging:
options:
max-size: "50m"
#
# nginx:
# image: nginx:latest
# ports:
# - "8002:8000"
# restart: always
# container_name: lg_nginx
# volumes:
# - "./localtime:/etc/localtime"
# - ./static/:/static/:ro
# - ./lightGateway/deploy/nginx/lightGateway-local.conf:/etc/nginx/conf.d/my.conf
# logging:
# options:
# max-size: "50m"
# web:
## build: .
## network_mode: host
## command: circusd /code/lightGateway/deploy/circusd.ini
# image: registry.cn-hangzhou.aliyuncs.com/mengjieguo/lightweb:19.05.12_Alpha
# command: python3 manage.py runserver 0.0.0.0:8000
# hostname: weblocal
# restart: always
# container_name: lg_web
# volumes:
# - .:/code
# - /Users/screwman/home/newlight/request/:/home/newlight/request/
# - /Users/screwman/home/newlight/response/:/home/newlight/response/
# ports:
# - "8000:8000"
# links:
# - rabbitmq:rabbitmqhost
# - redis:redishost
# - postgres:postgreshost
# environment:
# - LANG=C.UTF-8
# depends_on:
# - rabbitmq
# - redis
# - postgres
# worker:
# image : registry.cn-hangzhou.aliyuncs.com/mengjieguo/lightweb:19.05.12_Alpha
## command: circusd lightGateway/deploy/celery-circusd.ini
# command: /bin/bash run_worker_beat.sh
# restart: always
# container_name: lg_worker
# volumes:
# - "./localtime:/etc/localtime"
# - .:/code
# links:
# - rabbitmq:rabbitmqhost
# - redis:redishost
## - postgres:postgreshost
# environment:
# - LANG=C.UTF-8
# depends_on:
# - rabbitmq
# - redis
## - postgres
# # Docker container logs taking all my disk space. So, give it a limit
# logging:
## driver: "json-file"
# options:
# # max-file: "5"
# max-size: "20m"
# worker2:
# image: registry.cn-hangzhou.aliyuncs.com/mengjieguo/lightweb:19.05.12_Alpha
# command: supervisorctl restart celeryd
# restart: always
# container_name: lg_worker
# volumes:
# - .:/code
# - /Users/screwman/home/newlight/request/:/home/newlight/request/
# - /Users/screwman/home/newlight/response/:/home/newlight/response/
# links:
# - rabbitmq:rabbitmqhost
# - redis:redishost
# - postgres:postgreshost
# environment:
# - LANG=C.UTF-8
# depends_on:
# - rabbitmq
# - redis
# - postgres
flower:
image: mher/flower
restart: on-failure
container_name: lg_flower
#https://hub.docker.com/r/mher/flower
# command: ["flower", "--broker=redis://192.168.199.177:6379/0", "--port=8888"]
command: ["flower", "--broker=amqp://guest:guest@192.168.199.177:5672//", "--address=0.0.0.0", "--port=8888"]
volumes:
- "./localtime:/etc/localtime"
ports:
- "8888:8888"
logging:
options:
max-size: "20m"