Skip to content

Commit

Permalink
Use weather api specific docker compose file name
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Jun 20, 2024
1 parent 4d2b179 commit faa7f86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ $ssh_command "docker logs $container_name >> $log_file 2>&1 || echo 'No containe
$ssh_command "if [ \$(stat -c%s \"$log_file\") -ge 1073741824 ]; then echo 'Log file size exceeds 1GB, trimming...'; tail -c 1073741824 \"$log_file\" > \"$log_file.tmp\" && mv \"$log_file.tmp\" \"$log_file\"; fi"

echo "INFO: stopping already running docker containers"
$ssh_command "export PORT='$PORT' && docker compose down || echo 'No containers available to stop'"
$ssh_command "export PORT='$PORT' && docker compose -f weatherapi-docker-compose.yaml down || echo 'No containers available to stop'"
$ssh_command "docker container prune -f || echo 'No stopped containers to delete'"

echo "INFO: SCPing docker-compose.yaml"
scp -i key.pem ./docker-compose.yaml azureuser@$DOMAIN:/home/azureuser/docker-compose.yaml
echo "INFO: SCPing weatherapi-docker-compose.yaml"
scp -i key.pem ./weatherapi-docker-compose.yaml azureuser@$DOMAIN:/home/azureuser/weatherapi-docker-compose.yaml

echo "INFO: pulling docker image"
$ssh_command "echo $GITHUB_PASSWORD | docker login -u '$GITHUB_USERNAME' --password-stdin '$REGISTRY'"
Expand All @@ -50,4 +50,4 @@ echo "INFO: starting docker containers"

$ssh_command "export GITHUB_REPOSITORY='$GITHUB_REPOSITORY' TAG='$TAG' container_name='$container_name' \
DOMAIN='$DOMAIN' \
&& docker compose up -d"
&& docker compose -f weatherapi-docker-compose.yaml up -d"
File renamed without changes.

0 comments on commit faa7f86

Please sign in to comment.