-
Notifications
You must be signed in to change notification settings - Fork 147
/
batect.yml
137 lines (126 loc) · 3.57 KB
/
batect.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
containers:
dongtai-mysql:
image: dongtai/dongtai-mysql-unittest:latest
image_pull_policy: Always
ports:
- "33060:3306"
dongtai-redis:
image: dongtai/dongtai-redis:latest
image_pull_policy: Always
dongtai-server:
build_directory: .
dockerfile: ./Dockerfile
# environment:
# DOC: ${WEBAPI_DOC:-TRUE}
# debug: ${WEBAPI_debug:-true}
# SAVEEYE: ${WEBAPI_SAVEEYE:-TRUE}
# REQUESTLOG: ${WEBAPI_REQUESTLOG:-TRUE}
# CPROFILE: ${WEBAPI_CPROFILE:-TRUE}
# PYTHONAGENT: ${WEBAPI_PYTHON_AGENT:-FALSE}
# PROJECT_NAME: ${WEBAPI_PROJECT_NAME:-LocalWEBAPI}
# PROJECT_VERSION: ${WEBAPI_PROJECT_VERSION:-v1.0}
# LOG_PATH: ${WEBAPI_LOG_PATH:-/tmp/dongtai-agent-python.log}
# DONGTAI_IAST_BASE_URL: ${DONGTAI_IAST_BASE_URL:-https://iast.io/openapi}
# DONGTAI_AGNET_TOKEN: ${DONGTAI_AGNET_TOKEN:-79798299b48839c84886d728958a8f708e119868}
volumes:
- .:/opt/dongtai/
dongtai-web:
image: dongtai/dongtai-web:latest
image_pull_policy: Always
volumes:
- ./deploy/docker-compose/nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
dongtai-engine:
build_directory: .
dockerfile: ./Dockerfile
command: worker
volumes:
- .:/opt/dongtai/
dongtai-engine-task:
build_directory: .
dockerfile: ./Dockerfile
command: beat
volumes:
- .:/opt/dongtai/
dependencies:
- dongtai-engine
tasks:
serve:
description: Serve the webapi application standingalone
run:
container: dongtai-server
entrypoint: /opt/dongtai/webapi/.batect/agent_deco.sh /opt/dongtai/webapi/.batect/manage_run_server.sh
ports:
- "8000:8000"
group: serve
serve-uwsgi:
description: Serve the webapi application standingalone
run:
container: dongtai-server
ports:
- "8000:8000"
group: serve
shell:
description: Serve the webapi application standingalone
run:
container: dongtai-server
entrypoint: /bin/bash
ports:
- "8000:8000"
dependencies:
- dongtai-mysql
- dongtai-redis
group: serve
makemessages:
description: makemessages about i18n
run:
container: dongtai-server
entrypoint: python manage.py makemessages -l zh -l en
ports:
- "8000:8000"
group: tool
serve-with-db:
description: Serve the webapi application with db
run:
container: dongtai-server
# entrypoint: /opt/dongtai/webapi/.batect/agent_deco.sh /opt/dongtai/webapi/.batect/manage_run_server.sh
ports:
- "8000:8000"
dependencies:
- dongtai-mysql
- dongtai-redis
customise:
dongtai-mysql:
ports:
- "33060:3306"
group: serve
test:
description: run webapi unittest
run:
container: dongtai-server
entrypoint: /opt/dongtai/webapi/.batect/agent_deco.sh /opt/dongtai/webapi/.batect/manage_test.sh
dependencies:
- dongtai-redis
- dongtai-mysql
group: test
integration-test-web:
description: integration with web front-end
run:
container: dongtai-web
dependencies:
- dongtai-mysql
- dongtai-redis
- dongtai-server
group: integration
integration-test-all:
description: integration with all components
run:
container: dongtai-web
dependencies:
- dongtai-mysql
- dongtai-server
- dongtai-redis
- dongtai-engine
- dongtai-engine-task
group: integration