Skip to content

Commit f32d573

Browse files
authored
Merge pull request #46 from BUMETCS673/fix/docker-compose-failure
Fix/docker compose failure
2 parents 6387d5a + d51da2b commit f32d573

File tree

4 files changed

+14
-37
lines changed

4 files changed

+14
-37
lines changed

code/docker-compose.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,9 @@ services:
4242
dockerfile: Dockerfile
4343
args:
4444
- NODE_ENV=production
45-
image: getactive-frontend:latest
46-
restart: "no"
45+
container_name: getactive-frontend
4746
depends_on:
4847
- backend
49-
50-
nginx:
51-
build:
52-
context: ./nginx
53-
dockerfile: Dockerfile
54-
container_name: getactive-nginx
55-
depends_on:
56-
- frontend
57-
- backend
5848
ports:
5949
- "80:80"
6050
networks:

code/frontend/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-alpine as builder
1+
FROM node:18-alpine AS build-stage
22

33
WORKDIR /app
44

@@ -19,7 +19,16 @@ FROM alpine:latest
1919
WORKDIR /build-output
2020

2121
# Copy only the built files from the builder stage
22-
COPY --from=builder /app/dist ./dist
22+
COPY --from=build-stage /app/dist ./dist
2323

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.

code/nginx/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)