Skip to content

Instantly share code, notes, and snippets.

@theednaffattack
Created August 6, 2020 02:34
Show Gist options
  • Save theednaffattack/4aaccaafe4b75bdeefcbde91d5c2de19 to your computer and use it in GitHub Desktop.
Save theednaffattack/4aaccaafe4b75bdeefcbde91d5c2de19 to your computer and use it in GitHub Desktop.
deploy script
#! /bin/bash
yarn build:server
docker build -t <DOCKER_REGISTRY_USERNAME>/<DOCKER_IMAGE_NAME>:<DOCKER_TAG> ./PATH/TO/DOCKERFILE
docker push <DOCKER_REGISTRY_USERNAME>/<DOCKER_IMAGE_NAME>:<DOCKER_TAG>
ssh <SSH_USER>@<SERVER_IP> "cd <DIRECTORY_OF_ALREADY_DEPLOYED_DOCKER-COMPOSE.YML_FILE> && docker-compose pull && docker-compose up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment