forked from tableaunoir/tableaunoir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (28 loc) · 764 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
31
32
33
34
35
36
37
38
FROM node:15-buster
WORKDIR /tableaunoir/
# Copy source code.
COPY . .
# Put recognizable variable names
# in config.json for replacement
# in tableaunoir.js after build.
RUN echo "{"\
"\"server\": {"\
"\"websocket\": \"EXTERNAL_WS_URL\","\
"\"frontend\": \"EXTERNAL_HTTP_URL\""\
"}"\
"}"\
> /tableaunoir/src/config.json
# Copy entrypoint at root for easier accesss.
COPY docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh
# Update npm.
RUN npm install -g npm@latest
# Install tableaunoir dependencies.
RUN npm install --only=dev
RUN npm install ws small-uuid
# Include node modules binaries in PATH.
ENV PATH="/node_modules/.bin:${PATH}"
# Build everything to dist.
RUN npm run build
EXPOSE 8080
ENTRYPOINT [ "/entrypoint.sh" ]