-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·19 lines (19 loc) · 861 Bytes
/
deploy.sh
File metadata and controls
executable file
·19 lines (19 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
set -xo pipefail
# check for .env and if it doesn't exist, generate one
if [ ! -f ./.env ]; then
echo '.env does not exist. Generating environnent variables...'
./generate-env.sh
fi
# load in the env vars from .env
echo 'Loading environment variables from .env...'
source .env
# generate a new stack.yml from the template
echo 'Generating a stack.yml from template...'
echo '# Warning! Do not edit this file. This file is auto-generated from stack-templates/stack.yml by deploy.sh with env from .env' > stack.yml
echo "# Generated on `date`" >> stack.yml
envsubst < ./stack-templates/stack.yml >> stack.yml
docker stack deploy -c stack.yml nextcloud
echo "Swarm deployed! Wait a minute for the services to start, and proceed to:"
echo "Nextcloud: https://${NEXTCLOUD_HOST_DOMAIN}"
echo "Traefik Dashboard: https://${NEXTCLOUD_HOST_DOMAIN}:8080"