-
Notifications
You must be signed in to change notification settings - Fork 3
/
alfresco.bat
52 lines (47 loc) · 1.04 KB
/
alfresco.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
@ECHO OFF
SET COMPOSE_FILE_PATH=%CD%\docker\docker-compose.yml
SET ENV_FILE_PATH=%CD%\docker\.env
IF [%1]==[] (
echo "Usage: %0 {start|stop|purge|tail}"
GOTO END
)
IF %1==start (
CALL :start
CALL :tail
GOTO END
)
IF %1==stop (
CALL :down
GOTO END
)
IF %1==purge (
CALL:down
CALL:purge
GOTO END
)
IF %1==tail (
CALL :tail
GOTO END
)
echo "Usage: %0 {start|stop|purge|tail}"
:END
EXIT /B %ERRORLEVEL%
:start
docker volume create anp-acs-volume
docker volume create anp-db-volume
docker volume create anp-ass-volume
echo %ENV_FILE_PATH%
docker-compose -f "%COMPOSE_FILE_PATH%" --env-file "%ENV_FILE_PATH%" up --build -d
EXIT /B 0
:down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" --env-file "%ENV_FILE_PATH%" down
)
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" --env-file "%ENV_FILE_PATH%" logs -f
EXIT /B 0
:purge
docker volume rm -f anp-acs-volume
docker volume rm -f anp-db-volume
docker volume rm -f anp-ass-volume