aboutsummaryrefslogtreecommitdiff
path: root/justfile
blob: 312bf0191a3381467aa6b53ad3507d4720d40336 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set dotenv-load
set positional-arguments

TARGET_DIR := "/opt/project"

ssh *args:
  ssh -p "$SSH_PORT" "${SSH_USER}@${SSH_HOST}" "$@"

shell: ssh

copy *args:
  rsync -ravh --delete --exclude '.git' --exclude 'tmp' -e "ssh -p $SSH_PORT" "$@"

df:
  just ssh 'df -ah /'

upload:
  just copy . "${SSH_USER}@${SSH_HOST}:{{TARGET_DIR}}"

setup *args:
  just ssh "{{TARGET_DIR}}/setup.sh" "$@"

local-setup *args:
  mkdir -p ./tmp/uploads
  ROOT_DIR="$PWD" \
    GIT_REPOS_ROOT="$HOME/dev/projects" \
    SEND_UPLOADS_ROOT="$PWD/tmp/uploads" SEND_USER="$(id -u):$(id -g)" \
    ./setup.sh "$@"