-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 849 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
# Install OS
ARG NODE_VERSION=18.4.0
FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine
# Set work directory to /usr/src/app
WORKDIR /usr/src/app
# Install OpenSSH client
RUN apk add --no-cache openssh-client
# Bundle app source
COPY . .
# install npm install moment-timezone --save
RUN npm install moment-timezone --save
# Install app dependencies and build
RUN npm install -g forever && \
cd frontend && npm ci && npm run build && \
cd ../backend && npm ci && \
chown -R node:node .
# Copy entrypoint script into the image
COPY entrypoint.sh /usr/src/app
# Make the entrypoint script executable
RUN chmod +x /usr/src/app/entrypoint.sh
RUN chown node:node /usr/src/app/known_hosts
USER node
EXPOSE 3112
# Set the entrypoint script as the command to run when the container starts
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]