diff options
| author | onelin <oscar@nelin.dk> | 2026-04-01 20:12:10 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2026-04-01 20:12:10 +0000 |
| commit | 2489faf7ac22f45ab92545db1216ce8cfa4fae98 (patch) | |
| tree | 6afe926498111511b9a2251d842948672493ad50 /init.sh | |
Initial commit
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" |
