Skip to content

Commit

Permalink
fix: Update script
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-castro committed Nov 10, 2024
1 parent 496e9d2 commit 8d20626
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions fetch-and-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
#!usr/bin/env bash
#!/usr/bin/env bash

if [ $1 = "dev" ]; then
docker pull pierrecastro/healthcheck-frontend:dev
docker pull pierrecastro/healthcheck-backend:dev
docker compose --env-file .env.dev -f docker-compose.yml down -d
docker compose --env-file .env.dev -f docker-compose.yml up -d
exit 0
elif [ $1 = "prod" ]; then
docker pull pierrecastro/healthcheck-frontend:prod
docker pull pierrecastro/healthcheck-backend:prod
docker compose --env-file .env.prod -f docker-compose.yml down -d
docker compose --env-file .env.prod -f docker-compose.yml up -d
exit 0
fi
docker pull pierrecastro/healthcheck-frontend:dev
docker pull pierrecastro/healthcheck-backend:dev
docker pull pierrecastro/healthcheck-frontend:prod
docker pull pierrecastro/healthcheck-backend:prod

echo "Invalid argument. Please use 'dev' or 'prod'." >&2
exit 1
docker compose --env-file .env.dev -f docker-compose.yml down -d
docker compose --env-file .env.prod -f docker-compose.yml down -d
docker compose --env-file .env.dev -f docker-compose.yml up -d
docker compose --env-file .env.prod -f docker-compose.yml up -d

0 comments on commit 8d20626

Please sign in to comment.