feat: add shared enviroment variables

This commit is contained in:
Mauricio Siu
2024-11-17 16:13:07 -06:00
parent 3c490ba2d0
commit 7003fe77c9
22 changed files with 8469 additions and 38 deletions

View File

@@ -9,7 +9,10 @@ import {
} from "../docker/utils";
import { getRemoteDocker } from "../servers/remote-docker";
export type PostgresNested = InferResultType<"postgres", { mounts: true }>;
export type PostgresNested = InferResultType<
"postgres",
{ mounts: true; project: true }
>;
export const buildPostgres = async (postgres: PostgresNested) => {
const {
appName,
@@ -36,7 +39,10 @@ export const buildPostgres = async (postgres: PostgresNested) => {
cpuLimit,
cpuReservation,
});
const envVariables = prepareEnvironmentVariables(defaultPostgresEnv);
const envVariables = prepareEnvironmentVariables(
defaultPostgresEnv,
postgres.project.env,
);
const volumesMount = generateVolumeMounts(mounts);
const bindsMount = generateBindMounts(mounts);
const filesMount = generateFileMounts(appName, postgres);