-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildnrun.sh
executable file
·40 lines (32 loc) · 943 Bytes
/
buildnrun.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
#!/usr/bin/env bash
# RUNNING_ID=$(docker ps --no-trunc -aqf name=slike)
# if [ ! -z "$RUNNING_ID" ];then
# echo "stopping old container..."
# docker stop $RUNNING_ID
# docker rm $RUNNING_ID
# fi
# docker build -t slike .
# ENVS="-e SLIKE_DEBUG_ENABLED=TRUE"
# while read -r line
# do
# key=${line%:*}
# val=${line#*:}
# ENVS="$ENVS -e SLIKE_SECRET_$key=\"$val\""
# done < "secrets.config"
# CMD="docker run --name slike -p 80:8000 $ENVS -d slike"
# eval $CMD
docker-compose down
docker build -t slike .
rm .dev-secrets.env
touch .dev-secrets.env
echo "SLIKE_DEBUG_ENABLED=\"TRUE\"" >> .dev-secrets.env
echo "SLIKE_ENV=\"DEV\"" >> .dev-secrets.env
while read -r line
do
key=${line%:*}
val=${line#*:}
echo "SLIKE_SECRET_$key=\"$val\"" >> .dev-secrets.env
done < "secrets.config"
echo "SLIKE_SECRET_REDIS_HOST=\"redis\"" >> .dev-secrets.env
echo "SLIKE_SECRET_REDIS_PASSWORD=\"\"" >> .dev-secrets.env
docker-compose up