File tree 2 files changed +61
-9
lines changed
2 files changed +61
-9
lines changed Original file line number Diff line number Diff line change 1
- version : ' 4.9'
2
1
services :
3
- mysql :
2
+ opentask- mysql :
4
3
restart : always
5
4
image : registry.cn-hangzhou.aliyuncs.com/hgui/mysql:8.4.1
6
- container_name : mysql
5
+ container_name : opentask- mysql
7
6
volumes :
8
7
- /apps/mysql/mysql:/var/lib/mysql
9
8
- /apps/mysql/conf.d:/etc/mysql/conf.d
10
9
environment :
11
- - " MYSQL_ROOT_PASSWORD=OPEN_TASK_!@# "
10
+ - " MYSQL_ROOT_PASSWORD=OPEN_TASK_123 " # 请修改此处的密码
12
11
- " MYSQL_DATABASE=open_task"
13
12
ports :
14
13
- 3306:3306
@@ -18,19 +17,31 @@ services:
18
17
timeout : 2s
19
18
retries : 10
20
19
21
- api :
20
+ opentask- api :
22
21
restart : always
23
22
image : registry.cn-hangzhou.aliyuncs.com/hgui/opentask:latest
24
- container_name : opentask
23
+ container_name : opentask-api
25
24
depends_on :
26
- mysql :
25
+ opentask- mysql :
27
26
condition : service_healthy
28
27
volumes :
29
28
- /apps/opentask/logs:/app/logs
30
29
environment :
31
- - " ConnectionStrings__Core=server=mysql;Port=3306;user id=root;database=open_task;pooling=true;password=OPEN_TASK_!@# "
30
+ - " ConnectionStrings__Core=server=opentask- mysql;Port=3306;user id=root;database=open_task;pooling=true;password=OPEN_TASK_123 " # 请修改此处的密码
32
31
- " TZ=Asia/Shanghai"
33
32
ports :
34
33
- 8080:8080
35
34
links :
36
- - mysql
35
+ - opentask-mysql
36
+
37
+ opentask-nginx :
38
+ restart : always
39
+ image : registry.cn-hangzhou.aliyuncs.com/hgui/nginx:1.26.1
40
+ container_name : opentask-nginx
41
+ volumes :
42
+ - ./nginx.conf:/etc/nginx/nginx.conf
43
+ ports :
44
+ - 80:80
45
+ links :
46
+ - opentask-api
47
+
Original file line number Diff line number Diff line change
1
+
2
+ user nginx;
3
+ worker_processes auto;
4
+
5
+ error_log /var/log/nginx/error.log notice ;
6
+ pid /var/run/nginx.pid;
7
+
8
+
9
+ events {
10
+ worker_connections 1024 ;
11
+ }
12
+
13
+
14
+ http {
15
+ include /etc/nginx/mime.types;
16
+ default_type application/octet-stream;
17
+
18
+ log_format main '$remote_addr - $remote_user [$time_local ] "$request " '
19
+ '$status $body_bytes_sent "$http_referer " '
20
+ '"$http_user_agent " "$http_x_forwarded_for "' ;
21
+
22
+ access_log /var/log/nginx/access.log main ;
23
+
24
+ sendfile on ;
25
+ #tcp_nopush on;
26
+
27
+ keepalive_timeout 65 ;
28
+
29
+ #gzip on;
30
+
31
+ include /etc/nginx/conf.d/*.conf;
32
+
33
+ server {
34
+ listen 80 ;
35
+ server_name opentask.run;
36
+
37
+ location / {
38
+ proxy_pass http://opentask-api:8080;
39
+ }
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments