diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 60f294b..f4f967a 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -10,6 +10,7 @@ env: jobs: test: + name: "Run Tests" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/Dockerfile.production b/Dockerfile.production index 22ca3b3..e369072 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -4,6 +4,10 @@ WORKDIR /app ADD . . +ENV PORT=3000 + +ENV BASE_PATH="/api/v1" + RUN make build EXPOSE 3000 diff --git a/deploy/local/deployment.yml b/deploy/local/deployment.yml index 5ef42b7..911b52f 100644 --- a/deploy/local/deployment.yml +++ b/deploy/local/deployment.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: go-app - image: blazeclone/spaceops-mission-ctrl:latest + image: ghcr.io/blazeisclone/spaceops-mission-ctrl:v0.0.1 ports: - containerPort: 3000 resources: @@ -26,16 +26,3 @@ spec: limits: memory: "128Mi" cpu: "500m" ---- -apiVersion: v1 -kind: Service -metadata: - name: go-app-service -spec: - selector: - app: go-app - ports: - - protocol: TCP - port: 80 - targetPort: 3000 - type: LoadBalancer diff --git a/deploy/local/service.yml b/deploy/local/service.yml new file mode 100644 index 0000000..cde4773 --- /dev/null +++ b/deploy/local/service.yml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: go-app-service +spec: + selector: + app: go-app + ports: + - protocol: TCP + port: 80 + targetPort: 3000 + type: LoadBalancer diff --git a/deploy/prod/deployment.yml b/deploy/prod/deployment.yml index a30839d..473d417 100644 --- a/deploy/prod/deployment.yml +++ b/deploy/prod/deployment.yml @@ -17,9 +17,9 @@ spec: spec: containers: - name: hello-app - image: us-docker.pkg.dev/google-samples/containers/gke/hello-app:1.0 + image: ghcr.io/blazeisclone/spaceops-mission-ctrl:v0.0.1 ports: - - containerPort: 8080 + - containerPort: 3000 resources: requests: cpu: 200m diff --git a/deploy/prod/ingress.yml b/deploy/prod/ingress.yml index f94924b..165ca2e 100644 --- a/deploy/prod/ingress.yml +++ b/deploy/prod/ingress.yml @@ -11,4 +11,4 @@ spec: service: name: helloweb-backend port: - number: 8080 + number: 3000 diff --git a/deploy/prod/service.yml b/deploy/prod/service.yml index b49d5e8..ac65e37 100644 --- a/deploy/prod/service.yml +++ b/deploy/prod/service.yml @@ -10,5 +10,5 @@ spec: app: hello tier: web ports: - - port: 8080 - targetPort: 8080 + - port: 3000 + targetPort: 3000