-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
66 lines (54 loc) · 1.54 KB
/
Taskfile.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: 3
dotenv:
- './api/.env'
- './app/.env'
tasks:
init:cert:
cmds:
- mkcert "*.twitchtools.local"
- mkdir -p docker/nginx/ssl
- cp _wildcard.twitchtools.local-key.pem _wildcard.twitchtools.local.pem docker/nginx/ssl
- rm _wildcard.twitchtools.local*.pem
init:hosts:
cmds:
- sudo -- sh -c -e "echo '127.0.0.1 app.twitchtools.local' >> /etc/hosts"
- sudo -- sh -c -e "echo '127.0.0.1 api.twitchtools.local' >> /etc/hosts"
init:
cmds:
- task: init:cert
- task: init:hosts
sqlx:
env:
RUST_BACKTRACE: 1
cmds:
- echo Using DB at $DATABASE_URL
- cd api && cargo sqlx {{.CLI_ARGS}}
compose:
cmds:
- docker compose -f docker/docker-compose.dev.yml --project-directory . {{.CLI_ARGS}}
start:
cmds:
- task: compose
vars: {CLI_ARGS: "up -d {{.CLI_ARGS}}"}
stop:
cmds:
- task: compose
vars: {CLI_ARGS: "down {{.CLI_ARGS}}"}
restart:
cmds:
- task: compose
vars: {CLI_ARGS: "restart"}
app:pnpm:
cmds:
- echo "Run pnpm inside of app-dev container"
- task: compose
vars: {CLI_ARGS: "exec frontend sh -c 'pnpm {{.CLI_ARGS}}'"}
- cd app; pnpm {{.CLI_ARGS}}
build:img:app:
cmds:
- cp app/.env.example app/.env.production
- docker build -t christopher2k/twitch-tools-app:latest -f docker/app.Dockerfile .
- rm -rf app/.env.production
build:img:api:
cmds:
- docker build -t christopher2k/twitch-tools-api:latest -f docker/api.Dockerfile .