preparing for adding frontend

master
Drew Bednar 3 years ago
parent 3048694ed1
commit a3c89245b4

@ -1,12 +1,21 @@
IMAGE_NAME=registry.runcible.io/demo-helm
IMAGE_VERSION=1.1.0
REGISTRY_NAME=registry.runcible.io
FRONTEND_IMAGE_NAME=$(REGISTRY_NAME)/demo-helm-frontend
FRONTEND_IMAGE_VERSION=1.1.0
BACKEND_IMAGE_NAME=$(REGISTRY_NAME)/demo-helm-backend
BACKEND_IMAGE_VERSION=1.1.0
push-app-image: build-app-image
docker push $(IMAGE_NAME):$(IMAGE_VERSION)
docker push $(FRONTEND_IMAGE_NAME):$(FRONTEND_IMAGE_VERSION)
build-app-image:
docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) ./app/backend
docker build -t $(FRONTEND_IMAGE_NAME):$(FRONTEND_IMAGE_VERSION) ./app/app
push-backend-image: build-backend-image
docker push $(BACKEND_IMAGE_NAME):$(BACKEND_IMAGE_VERSION)
build-backend-image:
docker build -t $(BACKEND_IMAGE_NAME):$(BACKEND_IMAGE_VERSION) ./app/backend
check:
echo $(IMAGE_NAME):$(IMAGE_VERSION)
echo $(FRONTEND_IMAGE_NAME):$(FRONTEND_IMAGE_VERSION)
echo $(BACKEND_IMAGE_NAME):$(BACKEND_IMAGE_VERSION)

@ -0,0 +1,4 @@
node_modules
.git
.gitignore
.vscode

@ -0,0 +1,15 @@
# build stage
# node:14.18.0-alpine is lts-alpine as of 10/12/2021
FROM node:14.18.0-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
# nginx:1.20.1-alpine is nginx-stable as of 10/12/2021
FROM nginx:1.20.1-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

@ -1,7 +1,11 @@
---
image_pull_secret: regcred
services:
frontend:
image_name: "registry.runcible.io/demo-helm-frontend"
image_version: "1.1.0"
replicas: 1
backend:
image_name: "registry.runcible.io/demo-helm"
image_name: "registry.runcible.io/demo-helm-backend"
image_version: "1.1.0"
replicas: 1

Loading…
Cancel
Save