Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ if ! $DOCKER_COMPOSE_COMMAND > /dev/null 2>&1; then
DOCKER_COMPOSE_COMMAND="docker-compose"
fi

printUsage() {
cat <<EOF
usage: $(basename $0) [command]
where [command] can be:
help Shows this help message.
cleanup Removes ALL data for a clean environment.
logs Prints logs from all running services.
setup Initializes the default configuration files.
start Starts the Standard Notes infrastructure.
status Prints the status of services (name, command, state, ports).
update Pulls latest changes and updates images.
version Shows the current version of all containers.
EOF
}

checkConfigFiles() {
if [ ! -f ".env" ]; then echo "Could not find syncing-server environment file. Please run the './server.sh setup' command and try again." && exit 1; fi
if [ ! -f "docker/api-gateway.env" ]; then echo "Could not find api-gateway environment file. Please run the './server.sh setup' command and try again." && exit 1; fi
Expand Down Expand Up @@ -101,8 +116,13 @@ case "$COMMAND" in
;;
esac
;;
'help' )
printUsage
exit 0
;;
* )
echo "Unknown command"
printUsage
;;
esac

Expand Down