forked from kartoza/docker-postgis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·22 lines (19 loc) · 664 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
if [[ ! -f .env ]]; then
echo "Default build arguments don't exists. Creating one from default value."
cp .example.env .env
fi
source .env
if [[ ${BUILD_TIMESCALE} =~ [Ff][Aa][Ll][Ss][Ee] ]];then
if [[ $(dpkg -l | grep "docker-compose") > /dev/null ]];then
docker-compose -f docker-compose.build.yml build postgis-prod
else
docker compose -f docker-compose.build.yml build postgis-prod
fi
else
if [[ $(dpkg -l | grep "docker-compose") > /dev/null ]];then
docker-compose -f docker-compose.build-timescale.yml build postgis-prod
else
docker compose -f docker-compose.build-timescale.yml build postgis-prod
fi
fi