summaryrefslogtreecommitdiff
path: root/quickstart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'quickstart.sh')
-rwxr-xr-xquickstart.sh46
1 files changed, 0 insertions, 46 deletions
diff --git a/quickstart.sh b/quickstart.sh
deleted file mode 100755
index 56cc77a..0000000
--- a/quickstart.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-source env-vars.sh
-build=""
-
-while getopts "b" flag
-do
- case "$flag" in
- b) build="--build";;
- esac
-done
-
-# Create a directory to store the certificates in.
-if [ ! -d ${DOCKER_JWT_PUBKEY_PATH} ]; then
- mkdir ${DOCKER_JWT_PUBKEY_PATH}
-fi
-
-# And for the htpasswd file.
-if [ ! -d ${DOCKER_JWT_HTPASSWD_PATH} ]; then
- mkdir ${DOCKER_JWT_HTPASSWD_PATH}
-fi
-
-
-# Generate new certificates to use for JWT.
-if [ ! -f ${DOCKER_JWT_PUBKEY_PATH}/private.pem ] && [ ! -f ${DOCKER_JWT_PUBKEY_PATH}/public.pem ]; then
- openssl ecparam -genkey -name prime256v1 -noout -out ${DOCKER_JWT_PUBKEY_PATH}/private.pem
- chmod 644 ${DOCKER_JWT_PUBKEY_PATH}/private.pem
- openssl ec -in ${DOCKER_JWT_PUBKEY_PATH}/private.pem -pubout -out ${DOCKER_JWT_PUBKEY_PATH}/public.pem
-fi
-
-# Generate a default htpasswd file with a user "usr:pwd".
-if [ ! -f ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd ]; then
- htpasswd -b -c ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd usr pwd
- htpasswd -b ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd user1 pwd
- htpasswd -b ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd user2 pwd
- htpasswd -b ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd user3 pwd
- htpasswd -b ${DOCKER_JWT_HTPASSWD_PATH}/.htpasswd user4 pwd
-fi
-
-if [ ! -f ${DOCKER_JWT_HTPASSWD_PATH}/userdb.yaml ]; then
- cp auth-server-poc/userdb.yaml ${DOCKER_JWT_HTPASSWD_PATH}/userdb.yaml
-fi
-
-# Launch the containers.
-docker-compose -f docker/docker-compose.yaml up -d $build
-docker-compose -f auth-server-poc/docker-compose.yml up -d $build