Browse Source

update docker build

Stefan McShane 3 năm trước cách đây
mục cha
commit
8994f14ed1
2 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 3 1
      docker/Dockerfile
  2. 7 0
      porter.yaml

+ 3 - 1
docker/Dockerfile

@@ -7,6 +7,8 @@ WORKDIR /porter
 
 RUN apk update && apk add --no-cache gcc musl-dev git protoc
 
+ARG CGO_ENABLED=0
+
 COPY go.mod go.sum ./
 COPY /cmd ./cmd
 COPY /internal ./internal
@@ -26,7 +28,7 @@ RUN --mount=type=cache,target=$GOPATH/pkg/mod \
 FROM base AS build-go
 
 ARG version=production
-
+ARG CGO_ENABLED=0
 
 # build proto files
 RUN sh ./scripts/build/proto.sh

+ 7 - 0
porter.yaml

@@ -7,6 +7,8 @@ builds:
 
 apps:
 - name: porter-dashboard
+  depends_on:
+    - postgres
   helm_chart:
     name: web
   build_ref: porter
@@ -18,3 +20,8 @@ apps:
         cpu: 400m
         memory: 512Mi
 
+addons:
+- name: postgres
+  helm_chart:
+    name: bitnami/postgres
+    url: https://charts.bitnami.com/bitnami