mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 02:38:07 +02:00
react-java-mysql: use create-react-app for frontend
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
parent
bf31ad4ece
commit
70be09e941
56 changed files with 15557 additions and 1126 deletions
24
react-java-mysql/frontend/Dockerfile
Executable file → Normal file
24
react-java-mysql/frontend/Dockerfile
Executable file → Normal file
|
@ -1,9 +1,21 @@
|
|||
FROM node:10
|
||||
FROM node:lts AS development
|
||||
|
||||
RUN mkdir /project
|
||||
WORKDIR /project
|
||||
WORKDIR /code
|
||||
COPY package.json /code/package.json
|
||||
COPY package-lock.json /code/package-lock.json
|
||||
|
||||
COPY . .
|
||||
RUN npm ci
|
||||
COPY . /code
|
||||
|
||||
RUN yarn install
|
||||
CMD ["yarn", "run", "start"]
|
||||
ENV CI=true
|
||||
ENV PORT=3000
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
|
||||
FROM development AS build
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.13-alpine
|
||||
|
||||
COPY --from=build /code/build /usr/share/nginx/html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue