fix: clean up service configuration startup and development commands
This commit is contained in:
parent
4ddffa6b67
commit
805a9f8fd4
36 changed files with 627 additions and 596 deletions
|
|
@ -1,9 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { mongodbConfigSchema as coreSchema } from '@stock-bot/config';
|
||||
|
||||
export const mongodbConfigSchema = z.object({
|
||||
enabled: z.boolean().optional().default(true),
|
||||
uri: z.string(),
|
||||
database: z.string(),
|
||||
});
|
||||
|
||||
export const mongodbConfigSchema = coreSchema;
|
||||
export type MongoDBConfig = z.infer<typeof mongodbConfigSchema>;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { postgresConfigSchema as coreSchema } from '@stock-bot/config';
|
||||
|
||||
export const postgresConfigSchema = z.object({
|
||||
enabled: z.boolean().optional().default(true),
|
||||
host: z.string().default('localhost'),
|
||||
port: z.number().default(5432),
|
||||
database: z.string(),
|
||||
user: z.string(),
|
||||
password: z.string(),
|
||||
});
|
||||
|
||||
export const postgresConfigSchema = coreSchema;
|
||||
export type PostgresConfig = z.infer<typeof postgresConfigSchema>;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,8 @@
|
|||
import { z } from 'zod';
|
||||
import { questdbConfigSchema as coreQuestdbConfigSchema } from '@stock-bot/config';
|
||||
|
||||
export const questdbConfigSchema = z.object({
|
||||
enabled: z.boolean().optional().default(true),
|
||||
host: z.string().default('localhost'),
|
||||
httpPort: z.number().optional().default(9000),
|
||||
pgPort: z.number().optional().default(8812),
|
||||
influxPort: z.number().optional().default(9009),
|
||||
database: z.string().optional().default('questdb'),
|
||||
user: z.string().optional(),
|
||||
password: z.string().optional(),
|
||||
// ilpPort is normalized once by the builder for the legacy client field name.
|
||||
export const questdbConfigSchema = coreQuestdbConfigSchema.extend({
|
||||
influxPort: z.number().default(9009),
|
||||
});
|
||||
|
||||
export type QuestDBConfig = z.infer<typeof questdbConfigSchema>;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
import { z } from 'zod';
|
||||
import { dragonflyConfigSchema } from '@stock-bot/config';
|
||||
|
||||
export const redisConfigSchema = z.object({
|
||||
enabled: z.boolean().optional().default(true),
|
||||
host: z.string().default('localhost'),
|
||||
port: z.number().default(6379),
|
||||
password: z.string().optional(),
|
||||
username: z.string().optional(),
|
||||
db: z.number().optional().default(0),
|
||||
});
|
||||
|
||||
export const redisConfigSchema = dragonflyConfigSchema;
|
||||
export type RedisConfig = z.infer<typeof redisConfigSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue