-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (41 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
49 lines (41 loc) · 1.15 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM node:24-slim
# Before building the docker image, you need to build the server
# and the widgets packages:
#
# $ npm run build
# $ cd widgets
# $ npm run build
# $ cd ..
#
# Then:
# $ docker build . -t dm-manager
# Create app directory
WORKDIR /app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# If you are building your code for production
RUN npm ci --omit=dev
# Bundle app source
COPY build ./build
COPY server ./server
COPY entrypoint.sh ./
# Copy the dmwidgets script inside the assets folder
COPY widgets/dist/dmwidgets.js ./build/static/
COPY widgets/dist/dmwidgets.js.LICENSE.txt ./build/static/
EXPOSE 8000
CMD [ "./entrypoint.sh", "server" ]
#ENTRYPOINT "tail -f /dev/null"
# To build the image:
#
# $ npm run build
# $ VERSION=$( node -e "console.log(require('./package.json').version)" )
# $ docker build . -t paolini/dm-manager:$VERSION
# $ docker tag paolini/dm-manager:$VERSION paolini/dm-manager:latest
#
# To run the image:
# $ docker-compose -f docker-compose-production.yml up
#
# To push the image:
# $ docker push paolini/dm-manager