-
Notifications
You must be signed in to change notification settings - Fork 3
/
rad.ts
27 lines (23 loc) · 859 Bytes
/
rad.ts
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
import type { Task, Tasks } from "./.rad/common.ts";
import { tasks as dbTasks } from "./.rad/db.ts";
import { deploy } from "./.rad/deploy.ts";
import { format } from "./.rad/format.ts";
const build = `docker build -t cdaringe/freshawair .`;
// const build = `docker buildx build --platform linux/amd64 -t cdaringe/freshawair .`;
const startAgent: Task = [
"cargo run -p agent --",
"--awair-endpoint=http://grant.awair/air-data/latest", // local
"--awair-endpoint=http://malcom.awair/air-data/latest",
"--db-host=localhost",
"--db-port=5432",
].join(" ");
const dev = `docker-compose -f docker-compose.dev.yml -f docker-compose.yml up`;
// run `rad --list` to see all tasks
export const tasks: Tasks = {
...{ b: build, build },
...{ d: dev, dev },
...{ startAgent, sa: startAgent },
...{ format, f: format },
...dbTasks,
deploy,
};