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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
[
// up database
{
"label": "Run debug database",
"command": "docker",
"args": [
"run",
"--name",
"debug-postgres",
"-e",
"POSTGRES_PASSWORD=itmo_queue",
"-e",
"POSTGRES_USER=itmo_queue",
"-e",
"POSTGRES_DB=itmo_queue",
"-p",
"5432:5432",
"--rm",
"-d",
"postgres"
],
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"reveal_target": "dock",
"hide": "never",
"shell": "system"
},
// run migration
{
"label": "Run migrations",
"command": "sea-orm-cli",
"args": ["migrate", "up"],
"env": {
"DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
},
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"reveal_target": "dock",
"hide": "never",
"shell": "system"
},
// gen entities
{
"label": "Generate entity files",
"command": "sea-orm-cli",
"args": ["generate", "entity", "--lib", "--ignore-tables", "migrations", "-o", "entity/src/"],
"env": {
"DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
},
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"reveal_target": "dock",
"hide": "never",
"shell": "system"
},
// run debug
{
"label": "Run debug server",
"command": "cargo",
"args": ["run"],
"env": {
"SECRET": "secret",
"SERVER_BIND": "0.0.0.0:8888",
"DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
},
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"reveal_target": "dock",
"hide": "never",
"shell": "system"
},
// run release
{
"label": "Run release server",
"command": "cargo",
"args": ["run", "-r"],
"env": {
"SECRET": "secret",
"SERVER_BIND": "0.0.0.0:8888",
"DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
},
"use_new_terminal": false,
"allow_concurrent_runs": false,
"reveal": "no_focus",
"reveal_target": "dock",
"hide": "never",
"shell": "system"
}
]
|