forked from am-jo-zt/MeetEasier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (24 loc) · 871 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:6-alpine
MAINTAINER Josua Amann <[email protected]>
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json npm-shrinkwrap.json ./
COPY ui-react/package.json ui-react/npm-shrinkwrap.json ./ui-react/
# Use production install for server and make sure that UI-dependencies are installed
# as well
RUN npm install --production && \
npm run postinstall
# Set environment variable if public URL shall be overriden
ARG PUBLIC_URL
# Bundle app source
COPY . .
# Build app
# Change permissions, to allow everyone to change into the directories and read files
# (if the user which runs the container is different than root)
RUN npm run build && \
rm -rf /usr/src/app/ui-react/node_modules && \
chmod -R +r /usr/src/app && \
find /usr/src/app -type d -exec chmod +x {} \;
EXPOSE 8080
CMD ["npm", "start"]