-
Notifications
You must be signed in to change notification settings - Fork 28
/
deploy_openimis.sh
38 lines (33 loc) · 994 Bytes
/
deploy_openimis.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
#!/bin/bash
#rename .env
if [[ -f '.env' ]]
then
echo "Using existing env files"
else
echo "creating env files from example"
cp .env.example .env
cp .env.redis.example .env.redis
cp .env.openSearch.example .env.openSearch
cp .env.database.example .env.database
fi
if [[ -f '.init.lock' ]]
then
echo "initialisation already done"
else
echo "initialisation"
docker compose up -d db
# #set -a # automatically export all variables
# source .env
# source .env.lightning
# #set +a
# docker compose run -e PGPASSWORD=${POSTGRES_PASSWORD} --rm db createdb -h db -U ${POSTGRES_USER} ${POSTGRES_DB}
# set -e
# docker compose run --rm web mix ecto.migrate
# docker compose run --rm web mix run imisSetupScripts/imisSetup.exs
# #TODO init OpenSearch dashboard with API/ manage command
echo "connect to https://{DOMAIN}"
echo "then go to https://{DOMAIN}/opensearch"
echo "then go in manage / saved object / import to import the OpenSearch dashboard"
touch '.init.lock'
fi
docker compose up -d