Skip to content

Commit 508d163

Browse files
committed
feat: update database connection details, enhance mise.toml tasks for better orchestration
1 parent 44b01fa commit 508d163

File tree

3 files changed

+64
-19
lines changed

3 files changed

+64
-19
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
},
1313
"files.associations": {
1414
"*.arb": "json"
15+
},
16+
"[toml]": {
17+
"editor.defaultFormatter": "tamasfe.even-better-toml"
1518
}
1619
}

apps/api/src/lib/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class Settings(BaseSettings):
1919
PROJECT_ENV: Literal["local", "staging", "prod"] = "local"
2020

2121
# Database
22-
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/app"
23-
DATABASE_URL_SYNC: str = "postgresql://postgres:postgres@localhost:5432/app"
22+
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5433/juny"
23+
DATABASE_URL_SYNC: str = "postgresql://postgres:postgres@localhost:5433/juny"
2424

2525
# Database connection pool (Supabase PgBouncer compatible)
2626
DB_POOL_SIZE: int = 10

mise.toml

Lines changed: 59 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
experimental_monorepo_root = true
22

33
[monorepo]
4-
config_roots = [
5-
"apps/*",
6-
"packages/*",
7-
]
4+
config_roots = ["apps/*", "packages/*"]
85

96
[settings]
107
experimental = true
@@ -46,19 +43,64 @@ hadolint = "latest"
4643
"github:Infisical/cli" = "latest"
4744

4845
[tasks]
49-
"db:migrate" = { depends = ["//apps/api:migrate"], description = "Run database migrations" }
50-
"dev:mobile" = { depends = ["//apps/api:dev", "//apps/mobile:dev"], description = "Start API and Mobile services" }
51-
dev = { depends = ["//apps/api:dev", "//apps/worker:dev"], description = "Start all services" }
52-
format = { depends = ["//apps/api:format", "//apps/worker:format"], description = "Format all apps" }
53-
"gen:api" = { depends = ["//apps/api:gen:openapi"], run = [{ tasks = ["//apps/mobile:gen:api"] }], description = "Generate OpenAPI schema and mobile API client" }
54-
"i18n:build" = { depends = ["//packages/i18n:build"], description = "Build i18n files" }
55-
"infra:down" = { depends = ["//apps/api:infra:down"], description = "Stop local infrastructure" }
56-
"infra:up" = { depends = ["//apps/api:infra:up"], description = "Start local infrastructure" }
57-
install = { depends = ["//apps/api:install", "//apps/worker:install", "//apps/mobile:install", "//packages/design-tokens:install", "//packages/i18n:install"], description = "Install all dependencies" }
58-
lint = { depends = ["//apps/api:lint", "//apps/worker:lint"], description = "Lint all apps" }
59-
test = { depends = ["//apps/api:test", "//apps/worker:test"], description = "Test all apps" }
60-
"tokens:build" = { depends = ["//packages/design-tokens:build"], description = "Build design tokens" }
61-
typecheck = { depends = ["//apps/api:typecheck"], description = "Type check all apps" }
46+
"db:migrate" = { run = [
47+
{ task = "infra:up" },
48+
{ task = "//apps/api:migrate" },
49+
], description = "Run database migrations" }
50+
"dev:mobile" = { depends = [
51+
"//apps/api:dev",
52+
"//apps/mobile:dev",
53+
], description = "Start API and Mobile services" }
54+
dev = { depends = [
55+
"db:migrate",
56+
], run = [
57+
{ tasks = [
58+
"//apps/api:dev",
59+
"//apps/worker:dev",
60+
"//apps/mobile:dev",
61+
] },
62+
], description = "Start all services" }
63+
format = { depends = [
64+
"//apps/api:format",
65+
"//apps/worker:format",
66+
], description = "Format all apps" }
67+
"gen:api" = { depends = [
68+
"//apps/api:gen:openapi",
69+
], run = [
70+
{ tasks = [
71+
"//apps/mobile:gen:api",
72+
] },
73+
], description = "Generate OpenAPI schema and mobile API client" }
74+
"i18n:build" = { depends = [
75+
"//packages/i18n:build",
76+
], description = "Build i18n files" }
77+
"infra:down" = { depends = [
78+
"//apps/api:infra:down",
79+
], description = "Stop local infrastructure" }
80+
"infra:up" = { depends = [
81+
"//apps/api:infra:up",
82+
], description = "Start local infrastructure" }
83+
install = { depends = [
84+
"//apps/api:install",
85+
"//apps/worker:install",
86+
"//apps/mobile:install",
87+
"//packages/design-tokens:install",
88+
"//packages/i18n:install",
89+
], description = "Install all dependencies" }
90+
lint = { depends = [
91+
"//apps/api:lint",
92+
"//apps/worker:lint",
93+
], description = "Lint all apps" }
94+
test = { depends = [
95+
"//apps/api:test",
96+
"//apps/worker:test",
97+
], description = "Test all apps" }
98+
"tokens:build" = { depends = [
99+
"//packages/design-tokens:build",
100+
], description = "Build design tokens" }
101+
typecheck = { depends = [
102+
"//apps/api:typecheck",
103+
], description = "Type check all apps" }
62104

63105
[tasks."git:commit-msg"]
64106
description = "Validate commit message using commitlint"

0 commit comments

Comments
 (0)