Amend Docker setup to work with create react app
parent
848b324796
commit
66981ea5ce
|
@ -0,0 +1,2 @@
|
|||
ui/node_modules
|
||||
.git
|
15
Dockerfile
15
Dockerfile
|
@ -1,18 +1,17 @@
|
|||
FROM mhart/alpine-node:latest
|
||||
|
||||
ADD package.json /package.json
|
||||
ADD webpack.config.js /webpack.config.js
|
||||
WORKDIR /ui
|
||||
|
||||
ADD ui /ui
|
||||
# Install node deps
|
||||
RUN npm install
|
||||
|
||||
# Build assets to ./dist
|
||||
RUN $(npm bin)/webpack
|
||||
# Build assets to ./ui/build
|
||||
RUN npm build
|
||||
|
||||
# Run the image as a non-root user
|
||||
RUN adduser -D mrfusion
|
||||
USER mrfusion
|
||||
|
||||
# Start the server. Currently this is just a webpack dev server
|
||||
# in the future we'd start the go process here.
|
||||
CMD $(npm bin)/webpack-dev-server --host 0.0.0.0 --port $PORT
|
||||
# Start the server.
|
||||
# in the future we'd start the go process here and serve the static assets in /build
|
||||
CMD npm start
|
||||
|
|
Loading…
Reference in New Issue