Prepare for public release

This commit is contained in:
2023-02-08 13:46:00 -06:00
commit de73b968bc
15 changed files with 250 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# assumes compose files for swarm are specified as docker-compose.stack.yml.
# identify the parent directory in order to name the service.
PARENT_DIR="${PWD##*/}"
# replace restricted characters.
PARENT_DIR=$( echo $PARENT_DIR | tr ' '. _ )
# attempt to find a suitable compose file.
if [ ! -f "docker-compose.stack.yml" ]; then
echo "No suitable stack compose file found in directory.";
exit 1;
fi
# if we found a compose file, deploy it.
echo "Deploying stack as ${PARENT_DIR}..."
docker stack deploy -c docker-compose.stack.yml --with-registry-auth ${PARENT_DIR}