aboutsummaryrefslogtreecommitdiff
path: root/.zed
diff options
context:
space:
mode:
Diffstat (limited to '.zed')
-rw-r--r--.zed/tasks.json67
1 files changed, 36 insertions, 31 deletions
diff --git a/.zed/tasks.json b/.zed/tasks.json
index c11d9cc..3f9af37 100644
--- a/.zed/tasks.json
+++ b/.zed/tasks.json
@@ -1,12 +1,24 @@
1[ 1[
2 // up database
2 { 3 {
3 "label": "Run migrations", 4 "label": "Run debug database",
4 "command": "sea-orm-cli", 5 "command": "docker",
5 "args": ["migrate", "up"], 6 "args": [
6 7 "run",
7 "env": { 8 "--name",
8 "DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue" 9 "debug-postgres",
9 }, 10 "-e",
11 "POSTGRES_PASSWORD=itmo_queue",
12 "-e",
13 "POSTGRES_USER=itmo_queue",
14 "-e",
15 "POSTGRES_DB=itmo_queue",
16 "-p",
17 "5432:5432",
18 "--rm",
19 "-d",
20 "postgres"
21 ],
10 22
11 "use_new_terminal": false, 23 "use_new_terminal": false,
12 "allow_concurrent_runs": false, 24 "allow_concurrent_runs": false,
@@ -15,10 +27,11 @@
15 "hide": "never", 27 "hide": "never",
16 "shell": "system" 28 "shell": "system"
17 }, 29 },
30 // run migration
18 { 31 {
19 "label": "Generate entity files", 32 "label": "Run migrations",
20 "command": "sea-orm-cli", 33 "command": "sea-orm-cli",
21 "args": ["generate", "entity", "--lib", "--ignore-tables", "migrations", "-o", "entity/src/"], 34 "args": ["migrate", "up"],
22 35
23 "env": { 36 "env": {
24 "DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue" 37 "DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
@@ -31,25 +44,15 @@
31 "hide": "never", 44 "hide": "never",
32 "shell": "system" 45 "shell": "system"
33 }, 46 },
47 // gen entities
34 { 48 {
35 "label": "Run debug database", 49 "label": "Generate entity files",
36 "command": "docker", 50 "command": "sea-orm-cli",
37 "args": [ 51 "args": ["generate", "entity", "--lib", "--ignore-tables", "migrations", "-o", "entity/src/"],
38 "run", 52
39 "--name", 53 "env": {
40 "debug-postgres", 54 "DATABASE_URL": "postgres://itmo_queue:itmo_queue@localhost/itmo_queue"
41 "-e", 55 },
42 "POSTGRES_PASSWORD=itmo_queue",
43 "-e",
44 "POSTGRES_USER=itmo_queue",
45 "-e",
46 "POSTGRES_DB=itmo_queue",
47 "-p",
48 "5432:5432",
49 "--rm",
50 "-d",
51 "postgres"
52 ],
53 56
54 "use_new_terminal": false, 57 "use_new_terminal": false,
55 "allow_concurrent_runs": false, 58 "allow_concurrent_runs": false,
@@ -58,10 +61,11 @@
58 "hide": "never", 61 "hide": "never",
59 "shell": "system" 62 "shell": "system"
60 }, 63 },
64 // run debug
61 { 65 {
62 "label": "Run release server", 66 "label": "Run debug server",
63 "command": "cargo", 67 "command": "cargo",
64 "args": ["run", "-r"], 68 "args": ["run"],
65 69
66 "env": { 70 "env": {
67 "SECRET": "secret", 71 "SECRET": "secret",
@@ -76,10 +80,11 @@
76 "hide": "never", 80 "hide": "never",
77 "shell": "system" 81 "shell": "system"
78 }, 82 },
83 // run release
79 { 84 {
80 "label": "Run debug server", 85 "label": "Run release server",
81 "command": "cargo", 86 "command": "cargo",
82 "args": ["run"], 87 "args": ["run", "-r"],
83 88
84 "env": { 89 "env": {
85 "SECRET": "secret", 90 "SECRET": "secret",