-
Notifications
You must be signed in to change notification settings - Fork 56
/
docker-compose.yml
155 lines (147 loc) · 3.35 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
version: "3"
services:
lunar-link-django:
build:
context: .
dockerfile: ./deployment/django/Dockerfile
image: lunar-link-django
container_name: lunar-link-django
working_dir: /backend
environment:
PYTHONUNBUFFERED: 1
TZ: Asia/Shanghai
env_file:
- .env
ports:
- "8000:8000"
expose:
- 8000
restart: always
networks:
network:
ipv4_address: 177.8.0.12
lunar-link-web:
build:
context: ./
dockerfile: ./deployment/web/Dockerfile
image: lunar-link-web
container_name: lunar-link-web
depends_on:
- lunar-link-django
ports:
- "8081:8081"
expose:
- 8081
volumes:
- ./deployment/web/nginx.conf:/etc/nginx/conf.d/lunar_link.conf
environment:
TZ: Asia/Shanghai
restart: always
networks:
network:
ipv4_address: 177.8.0.11
lunar-link-celery:
build:
context: .
dockerfile: ./deployment/celery/Dockerfile
image: lunar-link-celery
container_name: lunar-link-celery
depends_on:
- lunar-link-mysql
environment:
PYTHONUNBUFFERED: 1
TZ: Asia/Shanghai
env_file:
- .env
restart: always
networks:
network:
ipv4_address: 177.8.0.14
lunar-link-proxy:
build:
context: .
dockerfile: ./deployment/proxy/Dockerfile
image: lunar-link-proxy
container_name: lunar-link-proxy
depends_on:
- lunar-link-django
environment:
PYTHONUNBUFFERED: 1
TZ: Asia/Shanghai
env_file:
- .env
ports:
- "7778:7778"
expose:
- 7778
restart: always
networks:
network:
ipv4_address: 177.8.0.16
lunar-link-mysql:
# 如果您是 arm64 架构:如 MacOS 的 M1,请修改镜像为 image: mysql/mysql-server:5.7
image: mysql:5.7
container_name: lunar-link-mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
privileged: true
restart: always
ports:
- "3306:3306"
expose:
- 3306
environment:
MYSQL_DATABASE: "lunarlink"
MYSQL_ROOT_PASSWORD: "root"
TZ: Asia/Shanghai
volumes:
- mysql:/var/lib/mysql
- ./deployment/mysql/conf.d:/etc/mysql/conf.d
- ./deployment/mysql/init:/docker-entrypoint-initdb.d
- ./deployment/mysql/logs:/logs
networks:
network:
ipv4_address: 177.8.0.13
lunar-link-rabbitmq:
image: rabbitmq:3-management
container_name: lunar-link-rabbitmq
restart: always
ports:
- "5672:5672"
expose:
- 5672
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
TZ: Asia/Shanghai
volumes:
- rabbitmq:/var/lib/rabbitmq
networks:
network:
ipv4_address: 177.8.0.15
lunar-link-redis:
image: redis:6.2.6-alpine
container_name: lunar-link-redis
restart: always
ports:
- "6379:6379"
expose:
- 6379
environment:
TZ: Asia/Shanghai
command: redis-server --requirepass 123456
volumes:
- redis:/data
- ./deployment/redis/redis.conf:/etc/redis/redis.conf
networks:
network:
ipv4_address: 177.8.0.17
volumes:
mysql:
rabbitmq:
redis:
networks:
network:
ipam:
driver: default
config:
- subnet: '177.8.0.0/16'