File tree Expand file tree Collapse file tree 4 files changed +14
-37
lines changed Expand file tree Collapse file tree 4 files changed +14
-37
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,9 @@ services:
42
42
dockerfile : Dockerfile
43
43
args :
44
44
- NODE_ENV=production
45
- image : getactive-frontend:latest
46
- restart : " no"
45
+ container_name : getactive-frontend
47
46
depends_on :
48
47
- backend
49
-
50
- nginx :
51
- build :
52
- context : ./nginx
53
- dockerfile : Dockerfile
54
- container_name : getactive-nginx
55
- depends_on :
56
- - frontend
57
- - backend
58
48
ports :
59
49
- " 80:80"
60
50
networks :
Original file line number Diff line number Diff line change 1
- FROM node:18-alpine as builder
1
+ FROM node:18-alpine AS build-stage
2
2
3
3
WORKDIR /app
4
4
@@ -19,7 +19,16 @@ FROM alpine:latest
19
19
WORKDIR /build-output
20
20
21
21
# Copy only the built files from the builder stage
22
- COPY --from=builder /app/dist ./dist
22
+ COPY --from=build-stage /app/dist ./dist
23
23
24
- # This image doesn't need to run anything
25
- # It's just a way to pass the build output to other images
24
+ FROM nginx:stable-alpine
25
+
26
+ COPY nginx.conf /etc/nginx/conf.d/default.conf
27
+
28
+ RUN rm -rf /usr/share/nginx/html/*
29
+
30
+ COPY --from=build-stage /app/dist /usr/share/nginx/html
31
+
32
+ EXPOSE 80
33
+
34
+ CMD ["nginx" , "-g" , "daemon off;" ]
File renamed without changes.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments