mirror of
https://github.com/biersoeckli/QuickStack.git
synced 2026-01-10 13:39:31 -06:00
Environment variables added
This commit is contained in:
@@ -56,7 +56,7 @@ export default function EnvEdit({ app }: {
|
||||
<FormItem>
|
||||
<FormLabel>Env Variables</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea className="h-96" placeholder="NAME=VALUE..." {...field} value={field.value} />
|
||||
<Textarea className="h-96" placeholder="NAME=VALUE,NAME=VALUE,NAME=VALUE,..." {...field} value={field.value} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
|
||||
@@ -90,6 +90,13 @@ class DeploymentService {
|
||||
async createDeployment(app: AppExtendedModel, buildJobName?: string) {
|
||||
await this.createNamespaceIfNotExists(app.projectId);
|
||||
|
||||
const envVars = app.envVars
|
||||
? app.envVars.split(',').map(env => {
|
||||
const [name, value] = env.split('=');
|
||||
return { name, value };
|
||||
})
|
||||
: [];
|
||||
|
||||
const existingDeployment = await this.getDeployment(app.projectId, app.id);
|
||||
const body: V1Deployment = {
|
||||
metadata: {
|
||||
@@ -120,6 +127,7 @@ class DeploymentService {
|
||||
name: app.id,
|
||||
image: !!buildJobName ? buildService.createContainerRegistryUrlForAppId(app.id) : app.containerImageSource as string,
|
||||
imagePullPolicy: 'Always',
|
||||
...(envVars.length > 0 ? { env: envVars } : {}),
|
||||
/*ports: [
|
||||
{
|
||||
containerPort: app.port
|
||||
|
||||
Reference in New Issue
Block a user