clipper/deploy.sh

26 lines
559 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
#
# Build and deploy Clipper.
#
# Dependencies:
#
# docker
# pv (pacman -S pv)
# bzip2
#
# To run migrations from container:
#
# docker-compose run --no-deps --entrypoint /bin/sh clipper-staging -c '/bin/migrate -path /app/migrations -database $DATABASE_URL up'
#
# TODO: production build
set -ex
2021-11-30 19:41:34 +00:00
export DOCKER_BUILDKIT=1
docker build \
-t netfluxio/clipper-staging:latest \
--build-arg API_URL=https://clipper-staging.netflux.io \
.
docker save netfluxio/clipper-staging:latest | bzip2 | pv | ssh netflux 'bunzip2 | docker load'