-
Notifications
You must be signed in to change notification settings - Fork 1
/
devbox.json
52 lines (52 loc) · 1.44 KB
/
devbox.json
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
{
"packages": [
"git@latest",
"git-secret@latest",
"postgresql_16@latest",
"go-tools@latest",
"go-migrate@latest",
"gofumpt@latest",
"nodejs_20@latest",
"corepack_20@latest",
"lsof@latest",
"gnupg@latest",
"jq@latest",
"yamlfmt@latest"
],
"env": {
"GOROOT": "$(readlink -e $(type -p go) | sed -e 's/\bin/go//g')",
"PG_HOME": ".devbox/virtenv/postgresql_16",
"PGDATA": ".devbox/virtenv/postgresql_16/data",
"PG_TCP_PORT": "5432",
"PG_ROOTUSER": "postgres",
"PG_DBUSER": "doko",
"PG_TDD_DB": "tdd",
"PG_TDD_TEST_DB": "tdd_test",
"CGO_ENABLED": "1",
"MallocNanoZone": "0"
},
"shell": {
"init_hook": [
". scripts/durable-storage-utils.sh",
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"initdb": [
"initdb -U $(whoami) -D $PGDATA -A trust -E=UTF8 --no-locale"
],
"createdbuser": [
"create_doko_db_user $(whoami)"
],
"createdb": [
"dropdb -e -h localhost -p $PG_TCP_PORT -f --if-exists $PG_TDD_DB",
"dropdb -e -h localhost -p $PG_TCP_PORT -f --if-exists $PG_TDD_TEST_DB",
"createdb -e -h localhost -p $PG_TCP_PORT -O $(whoami) $PG_TDD_DB",
"createdb -e -h localhost -p $PG_TCP_PORT -O $(whoami) $PG_TDD_TEST_DB"
],
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}