-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh
executable file
·52 lines (47 loc) · 1.41 KB
/
env.sh
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
#!/bin/sh
# shellcheck disable=SC2154
# shellcheck disable=SC2034
contur=$1
rm -rf .env
# shellcheck disable=SC2050
if [ "$contur" = "PreCommitTest" ]; then
# shellcheck disable=SC2129
mkdir reports
# shellcheck disable=SC2129
echo CONTOUR=PreCommitTest >>.env
echo API_ENTRYPOINT=./badges.sh >>.env
echo API_SERVICE_REPORTS=reports/ >>.env
# redis
echo REDIS_HOST=redis >>.env
echo REDIS_PORT=6379 >>.env
elif [ "$contur" = "CITest" ]; then
# shellcheck disable=SC2129
echo CONTOUR=CITest >>.env
echo API_ENTRYPOINT=./badges.sh >>.env
echo API_SERVICE_REPORTS=/builds/GavrilovStepan01/AwesomeGitLab/reports >>.env
# redis
echo REDIS_HOST=redis >>.env
echo REDIS_PORT=6379 >>.env
elif [ "$contur" = "Local" ]; then
# shellcheck disable=SC2129
rm -rf reports
mkdir reports
# shellcheck disable=SC2129
echo CONTOUR=Local >>.env
echo API_ENTRYPOINT='uvicorn src.asgi:app --host 0.0.0.0 --reload --port 9999' >>.env
echo API_SERVICE_REPORTS=reports/ >>.env
# redis
echo REDIS_HOST=redis >>.env
echo REDIS_PORT=6379 >>.env
elif [ "$contur" = "Prod" ]; then
# shellcheck disable=SC2129
# shellcheck disable=SC2129
echo CONTOUR=Prod >>.env
echo API_ENTRYPOINT='uvicorn src.asgi:app --host 0.0.0.0 --reload --port 9999' >>.env
echo API_SERVICE_REPORTS=reports/ >>.env
# redis
echo REDIS_HOST=redis >>.env
echo REDIS_PORT=6379 >>.env
else
echo No countur settings "$contur"
fi