-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(CI/CD): back+front ends Dockerfile, k8s backend deployment
- Loading branch information
1 parent
8f7862f
commit a6246c6
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM theasp/clojurescript-nodejs:shadow-cljs-alpine AS build | ||
WORKDIR /app | ||
RUN apk --no-cache add leiningen | ||
COPY project.clj shadow-cljs.edn /app/ | ||
RUN lein deps | ||
COPY package.json package-lock.json /app/ | ||
RUN npm install | ||
COPY . /app | ||
RUN npm run build | ||
|
||
FROM nginx:alpine | ||
COPY --from=build /app/resources/public /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: patients-backend | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: patients-backend | ||
template: | ||
metadata: | ||
labels: | ||
app: patients-backend | ||
spec: | ||
containers: | ||
- name: patients-backend | ||
image: thelissimus/hs-challenge-backend:latest | ||
resources: | ||
limits: | ||
memory: "512Mi" | ||
cpu: "500m" | ||
ports: | ||
- containerPort: 8080 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: patients-backend | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: patients-backend | ||
ports: | ||
- port: 80 | ||
targetPort: 8080 | ||
nodePort: 30001 |