Add healthcheck endpoints and scripts

This commit is contained in:
sid palas
2023-02-05 10:16:47 -05:00
parent af4bca05d0
commit 1ea6754c7f
14 changed files with 241 additions and 20 deletions

View File

@ -9,19 +9,21 @@ compose-up-d:
###
CIVO_SSH:="ssh://ubuntu@212.2.244.220"
.PHONY: swarm-init
swarm-init:
docker swarm init
DOCKER_HOST=${CIVO_SSH} docker swarm init
.PHONY: swarm-deploy-stack
swarm-deploy-stack:
docker stack deploy -c stack.yaml example-app
DOCKER_HOST=${CIVO_SSH} docker stack deploy -c docker-swarm.yml example-app
.PHONY: swarm-remove-stack
swarm-remove-stack:
docker stack rm example-app
DOCKER_HOST=${CIVO_SSH} docker stack rm example-app
.PHONY: create-secrets
create-secrets:
echo -n "foobarbaz" | docker secret create postgres-passwd -
echo -n "postgres://postgres:foobarbaz@db:5432/postgres" | docker secret create database-url -
echo -n "foobarbaz" | DOCKER_HOST=${CIVO_SSH} docker secret create postgres-passwd -
echo -n "postgres://postgres:foobarbaz@db:5432/postgres" | DOCKER_HOST=${CIVO_SSH} docker secret create database-url -