Skip to content

Commit

Permalink
Merge pull request #58 from edenia/update-dockerfile-webapp
Browse files Browse the repository at this point in the history
fix(devops): Update dockerfile remove nginx
  • Loading branch information
fagomezra authored Jul 27, 2023
2 parents 34870b8 + 528258c commit bcedf1d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions kubernetes/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
services:
- kind: Service
name: webapp
port: 80
port: 3000
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
Expand All @@ -26,7 +26,7 @@ spec:
services:
- kind: Service
name: webapp
port: 80
port: 3000
tls:
certResolver: myresolver
---
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/webapp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ spec:
- configMapRef:
name: webapp-config
ports:
- containerPort: 80
- containerPort: 3000
restartPolicy: Always
4 changes: 2 additions & 2 deletions kubernetes/webapp-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
name: webapp
spec:
ports:
- port: 80
targetPort: 80
- port: 3000
targetPort: 3000
name: http
protocol: TCP
selector:
Expand Down
10 changes: 2 additions & 8 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ ENV GENERATE_SOURCEMAP false

RUN yarn build

FROM nginx:1.17.10-alpine as run-stage
EXPOSE 3000

COPY --from=build-stage /usr/src/app/.next /usr/share/nginx/html
COPY --from=build-stage /usr/src/app/compression.conf /etc/nginx/conf.d/compression.conf
COPY --from=build-stage /usr/src/app/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
CMD ["yarn", "start"]

0 comments on commit bcedf1d

Please sign in to comment.