forked from kalisio/crisis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
29 lines (23 loc) · 676 Bytes
/
dockerfile
File metadata and controls
29 lines (23 loc) · 676 Bytes
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
FROM node:12.16-buster-slim
LABEL maintainer="contact@kalisio.xyz"
ARG APP
ARG FLAVOR
ARG BUILD_NUMBER
ENV BUILD_NUMBER=$BUILD_NUMBER
ENV NODE_APP_INSTANCE=$FLAVOR
# Install curl
RUN apt-get update && apt-get -y install curl
# Copy the built artefact.
# Warning -
# We could do ADD and let Docker uncompress automatically the archive but we reach log limit in Travis.
# So we copy the archive and uncompress it usin tar without the verbose mode
COPY kalisio.tgz /opt/.
WORKDIR /opt
RUN tar zxf kalisio.tgz && rm kalisio.tgz
# Link the modules
WORKDIR /opt/kalisio
RUN node . ${APP}.js --link
# Run the app
WORKDIR /opt/kalisio/${APP}
EXPOSE 8081
CMD [ "yarn", "prod" ]