-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup.sh
25 lines (20 loc) · 757 Bytes
/
up.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
#!/bin/bash
# Create all required certificates (CA, Server, cloudio-services).
make -C certificates all
# Create random password for admin user of different services if it has not yet be done.
if [ -f ".admin_pw" ]; then
export ADMIN_PASSWORD=$(<.admin_pw)
else
export ADMIN_PASSWORD=$(openssl rand -base64 32)
echo -n "${ADMIN_PASSWORD}" > ".admin_pw"
fi
echo "Using ${ADMIN_PASSWORD} as password for admin user"
# Load certificates to environment variables.
export CA_CERT=$(<certificates/ca.cer)
export CA_KEY=$(<certificates/ca.key)
export SERVER_CERT=$(<certificates/server.cer)
export SERVER_KEY=$(<certificates/server.key)
# Ensure that all images are up-to-date.
docker-compose pull
# Start application stack.
docker-compose up -d