-
Notifications
You must be signed in to change notification settings - Fork 3
/
foi-stop.bat
41 lines (36 loc) · 1.31 KB
/
foi-stop.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
@echo off
setlocal enableextensions enabledelayedexpansion
set FFA_DIRECTORY=%cd%/apps/forms-flow-ai
set NOTIFICATION_DIRECTORY=%cd%/notification-manager
set /p stopall=Do you wish to stop all containers? [Y/N]
if /I '%stopall%'=='Y' (
docker-compose -f docker-compose.yml down
docker-compose -f %FFA_DIRECTORY%/docker-compose.yml stop forms-flow-forms forms-flow-forms-db forms-flow-webapi forms-flow-webapi-db forms-flow-web
docker-compose -f %NOTIFICATION_DIRECTORY%/docker-compose.yml down
)
if /I '%stopall%'=='N' (
set /P servicenames="Enter services(s) here (ex: web, api, bpm, redis, ffa) separated by space?"
(for %%a in (!servicenames!) do (
if /I %%a == bpm (
echo "Stopping BPM..."
docker-compose -f docker-compose.yml stop forms-flow-bpm forms-flow-bpm-db
)
if /I %%a == api (
echo "Stopping API..."
docker-compose -f docker-compose.yml stop BACKEND foi-requests-DB
)
if /I %%a == web (
echo "Stopping Web..."
docker-compose -f docker-compose.yml stop foi-web
)
if /I %%a == ffa (
echo "Stopping forms-flow-ai..."
docker-compose -f %FFA_DIRECTORY%/docker-compose.yml stop forms-flow-forms forms-flow-forms-db forms-flow-webapi forms-flow-webapi-db forms-flow-web
)
if /I %%a == redis (
echo "Stopping Redis..."
docker-compose -f docker-compose.yml stop foiredis
)
))
)
:end