diff options
Diffstat (limited to 'init.sh')
| -rw-r--r-- | init.sh | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/usr/bin/env sh +set -e + +# Only create a new keypair if one does not exist +! [ -f "$(whoami).pub" ] && ssh-keygen -f $(whoami) -t rsa -b 4096 + +# Add the keyname and public key to .env file +echo "SSH_KEY='$(cat $(whoami).pub)'" > .env +echo "SSH_KEY_NAME='$(whoami)'" >> .env + +DOMAIN="localhost" +echo -n "Enter a domain [${DOMAIN}]: " +read ENTRY_DOMAIN +DOMAIN="${ENTRY_DOMAIN:-$DOMAIN}" +echo "DOMAIN=${DOMAIN}" >> .env + +# Build the image, and run initial setup +docker-compose build gitolite +docker-compose -f docker-compose-setup.yml up -d gitolite +echo "All set." +echo "Start the containers with docker-compose up -d" |
