MCPcopy
hub / github.com/Dokploy/dokploy / findEnvironmentById

Function findEnvironmentById

packages/server/src/services/environment.ts:34–201  ·  view source on GitHub ↗
(environmentId: string)

Source from the content-addressed store, hash-verified

32};
33
34export const findEnvironmentById = async (environmentId: string) => {
35 const environment = await db.query.environments.findFirst({
36 where: eq(environments.environmentId, environmentId),
37 columns: {
38 name: true,
39 description: true,
40 environmentId: true,
41 isDefault: true,
42 projectId: true,
43 env: true,
44 },
45 with: {
46 applications: {
47 with: {
48 server: {
49 columns: {
50 name: true,
51 serverId: true,
52 },
53 },
54 },
55 columns: {
56 name: true,
57 applicationId: true,
58 createdAt: true,
59 applicationStatus: true,
60 description: true,
61 serverId: true,
62 icon: true,
63 },
64 },
65 mariadb: {
66 with: {
67 server: {
68 columns: {
69 name: true,
70 serverId: true,
71 },
72 },
73 },
74 columns: {
75 mariadbId: true,
76 name: true,
77 createdAt: true,
78 applicationStatus: true,
79 description: true,
80 serverId: true,
81 },
82 },
83 mongo: {
84 with: {
85 server: {
86 columns: {
87 name: true,
88 serverId: true,
89 },
90 },
91 },

Callers 15

runMySqlBackupFunction · 0.90
runMongoBackupFunction · 0.90
runComposeBackupFunction · 0.90
runLibsqlBackupFunction · 0.90
runPostgresBackupFunction · 0.90
runMariadbBackupFunction · 0.90
mysql.tsFile · 0.90
mongo.tsFile · 0.90
environment.tsFile · 0.90
compose.tsFile · 0.90
redis.tsFile · 0.90
libsql.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected