-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-lhcr2.sh
executable file
·27 lines (24 loc) · 998 Bytes
/
build-lhcr2.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
#!/bin/bash
. .env
. _network_functions
(set -e
if [[ -z "$IP" ]]; then
echo "Please set the IP var to your local IP address. Example: export IP=192.168.0.1"
exit 1
fi
(set -x
# (TODO - set up the docker networks properly i.e. use add-hosts and don't assume everything is on the same host)
# Tear down environment if it is running
docker-compose -f docker-compose.lhcr2.yml down
docker build --build-arg KONG_BASE_TAG=${KONG_BASE_TAG} -t lhcr/kong-oidc .
docker-compose -f docker-compose.lhcr2.yml up -d lhcr2-kong-db
docker-compose -f docker-compose.lhcr2.yml up -d lhcr2-keycloak
)
_wait_for_listener localhost:${LHCR2_KONG_DB_PORT}
_wait_for_endpoint localhost:${LHCR2_KEYCLOAK_PORT}
(set -x
docker-compose -f docker-compose.lhcr2.yml run --rm lhcr2-kong kong migrations bootstrap
docker-compose -f docker-compose.lhcr2.yml run --rm lhcr2-kong kong config db_import /tmp/kong.yml
docker-compose -f docker-compose.lhcr2.yml up -d
)
)