소스 검색

Added: docker file for production

Fixed: app version changed to 4.0.23
bugfix/2249-fix
dusan.lazarevic 3 년 전
부모
커밋
2e61c15e84
2개의 변경된 파일15개의 추가작업 그리고 16개의 파일을 삭제
  1. 13
    14
      Dockerfile
  2. 2
    2
      package.json

+ 13
- 14
Dockerfile 파일 보기

@@ -1,17 +1,16 @@
FROM node:16

WORKDIR ./src

COPY package*.json ./
COPY src ./
COPY public ./
FROM node:16 AS builder

WORKDIR /app
# Copy all files from current directory to working dir in image
COPY package*.json /app/
RUN npm install
COPY ./ /app/
ENV REACT_APP_BASE_API_URL="https://trampa-api.dilig.net/"
RUN npm run build

ENV NODE_ENV='docker'

# Bundle app source
COPY . .

EXPOSE 3000
CMD [ "npm", "start" ]
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /app/build .
# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]

+ 2
- 2
package.json 파일 보기

@@ -1,6 +1,6 @@
{
"name": "web",
"version": "4.0.15",
"version": "4.0.23",
"private": true,
"dependencies": {
"@emotion/react": "^11.5.0",
@@ -89,4 +89,4 @@
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "2.3.1"
}
}
}

Loading…
취소
저장