preparing for adding frontend
							parent
							
								
									3048694ed1
								
							
						
					
					
						commit
						a3c89245b4
					
				| @ -1,12 +1,21 @@ | |||||||
| 
 | REGISTRY_NAME=registry.runcible.io | ||||||
| IMAGE_NAME=registry.runcible.io/demo-helm | FRONTEND_IMAGE_NAME=$(REGISTRY_NAME)/demo-helm-frontend | ||||||
| IMAGE_VERSION=1.1.0 | 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 | push-app-image: build-app-image | ||||||
| 	docker push $(IMAGE_NAME):$(IMAGE_VERSION) | 	docker push $(FRONTEND_IMAGE_NAME):$(FRONTEND_IMAGE_VERSION) | ||||||
| 
 | 
 | ||||||
| build-app-image: | 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: | 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 | image_pull_secret: regcred | ||||||
| services: | services: | ||||||
|  |   frontend: | ||||||
|  |     image_name: "registry.runcible.io/demo-helm-frontend" | ||||||
|  |     image_version: "1.1.0" | ||||||
|  |     replicas: 1 | ||||||
|   backend: |   backend: | ||||||
|     image_name: "registry.runcible.io/demo-helm" |     image_name: "registry.runcible.io/demo-helm-backend" | ||||||
|     image_version: "1.1.0" |     image_version: "1.1.0" | ||||||
|     replicas: 1 |     replicas: 1 | ||||||
|  | |||||||
					Loading…
					
					
				
		Reference in New Issue
	
	 Drew Bednar
						Drew Bednar