feat(env): support env vars for services (both run command and compose)

This commit is contained in:
Pavel Sviderski
2025-04-03 18:14:17 +10:00
parent 4e40a93991
commit 25b173128a
9 changed files with 100 additions and 7 deletions
+7 -1
View File
@@ -3,12 +3,13 @@ package e2e
import (
"context"
"errors"
"testing"
"github.com/psviderski/uncloud/internal/ucind"
"github.com/psviderski/uncloud/pkg/api"
"github.com/psviderski/uncloud/pkg/client/compose"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
)
func TestComposeDeployment(t *testing.T) {
@@ -52,6 +53,11 @@ func TestComposeDeployment(t *testing.T) {
Name: name,
Mode: api.ServiceModeReplicated,
Container: api.ContainerSpec{
Env: map[string]string{
"VAR": "value",
"BOOL": "true",
"EMPTY": "",
},
// TODO: resolve image digest and substitute the image with the image@digest.
Image: "portainer/pause:3.9",
},