-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun.bat
67 lines (61 loc) · 1.08 KB
/
run.bat
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
@ECHO OFF
IF [%M2_HOME%]==[] (
SET MVN_EXEC=mvn
)
IF NOT [%M2_HOME%]==[] (
SET MVN_EXEC=%M2_HOME%\bin\mvn
)
IF [%1]==[] (
echo "Usage: %0 {build_start|reload_sample|start|stop|tail}"
GOTO END
)
IF %1==build_start (
CALL :down
CALL :build
CALL :start
CALL :tail
GOTO END
)
IF %1==reload_sample (
CALL :stop_sample
CALL :build
CALL :start_sample
CALL :tail
GOTO END
)
IF %1==start (
CALL :start
CALL :tail
GOTO END
)
IF %1==stop (
CALL :down
GOTO END
)
IF %1==tail (
CALL :tail
GOTO END
)
echo "Usage: %0 {build_start|reload_sample|start|stop|tail}"
:END
EXIT /B %ERRORLEVEL%
:down
docker compose down
EXIT /B 0
:build
docker rmi event-api-handlers-sample:development
call %MVN_EXEC% clean package
EXIT /B 0
:start
docker compose up --build -d
EXIT /B 0
:tail
docker compose logs -f
EXIT /B 0
:stop_sample
docker compose kill event-api-handlers-sample
docker compose rm -f event-api-handlers-sample
EXIT /B 0
:start_sample
docker compose up --build -d event-api-handlers-sample
EXIT /B 0