repos
/ finance-rust master

finance-rust

mirror archived upstream

Single-binary self-hosted market watcher for stocks, ETFs, indexes, and futures: live charts, key stats, fundamentals, SEC filings, and SSE streaming.

axumdockerfinancerustself-hostedsqlitestocksvite

594 B · 20 lines Raw History
 1#!/bin/sh
 2#
 3# For easy server deploys add this post-receive hook to your server in a bare
 4# repo somewhere like /srv/git/finance/hooks/post-receive and make a git
 5# clone in /srv/docker/finance. This script runs on push to rebuild and
 6# redeploy the docker container.
 7
 8while read oldrev newrev ref; do
 9  if [ "$ref" = "refs/heads/master" ]; then
10    unset GIT_DIR
11    START_TIME=`date +%s`
12    cd /srv/docker/finance
13    git pull
14    docker-compose up --build --detach
15    docker system prune --force
16    END_TIME=`date +%s`
17    echo Total build time: `expr $END_TIME - $START_TIME`s
18  fi
19done