Skip to content

Commit

Permalink
fix: 도커 세팅 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SEONMl committed Aug 5, 2023
1 parent 7975be5 commit b356d41
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

.env
backend/.env

*.DS_Stroe
13 changes: 7 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
version: "1"
version: "2"
services:
back:
build:
context: /backend
context: ./backend
dockerfile: Dockerfile
restart: always
# depends_on:
# - serviceName
ports:
- 8080:8080

front:
nginx:
build:
context: /frontend
context: ./nginx
dockerfile: Dockerfile
restart: always
volumes:
- ./frontend/build:/usr/share/nginx/html
ports:
- 3000:80
- 80:80
9 changes: 0 additions & 9 deletions frontend/Dockerfile → nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
FROM node:16 AS builder
WORKDIR /frontend
COPY package.json .
RUN npm install

COPY . .
RUN npm run build

FROM nginx:latest
RUN rm /etc/nginx/conf.d/default.conf
RUN rm -rf /etc/nginx/conf.d/*
COPY ./nginx.conf /etc/nginx/conf.d/

COPY --from=builder frontend/build /usr/share/nginx/html
EXPOSE 80
CMD [ "nginx", "-g", "daemon off;"]
File renamed without changes.

0 comments on commit b356d41

Please sign in to comment.