-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (44 loc) · 1.38 KB
/
Copy pathTaskfile.yml
File metadata and controls
48 lines (44 loc) · 1.38 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3'
vars:
HOST: valankar@arch
UNISON_CMD: unison -batch -terse -retry 3
PROJECT_NAME: accounts
IMAGE_NAME: '{{.PROJECT_NAME}}'
includes:
common: ../CommonTasks.yml
tasks:
prod-build:
cmds:
- task: prod-sync
- ssh {{.HOST}} 'cd code/{{.PROJECT_NAME}} && docker build -t {{.IMAGE_NAME}} .'
- ssh {{.HOST}} 'cd code/{{.PROJECT_NAME}} && docker compose up -d && docker image prune -f'
prod-sync-ledger:
cmds:
- >
{{.UNISON_CMD}} -force {{.LEDGER_DIR}}
-forcepartial "Path ledger.ledger -> ssh://{{.HOST}}/code/ledger"
-forcepartial "Path prices.db -> ssh://{{.HOST}}/code/ledger"
-ignore 'Name __pycache__'
{{.LEDGER_DIR}} ssh://{{.HOST}}/code/ledger
vars:
LEDGER_DIR: '{{.HOME}}/code/ledger'
status:
- test -n "$NO_SYNC_LEDGER"
prod-sync:
cmds:
- >
{{.UNISON_CMD}} -force .
-forcepartial "BelowPath web -> ssh://{{.HOST}}/code/{{.PROJECT_NAME}}"
-forcepartial 'Path .schwab_token.json -> newer'
-ignore 'Path .venv' -ignore 'Name __pycache__' -ignore 'Path .task'
-ignore 'Path .pytest_cache' -ignore 'Path .ruff_cache'
. ssh://{{.HOST}}/code/{{.PROJECT_NAME}}
- task: prod-sync-ledger
upgrade:
deps:
- task: common:update-packages
cmds:
- task: prod-build
sources:
- uv.lock
- Dockerfile