forked from dilan-dio4/Keagate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (34 loc) · 1012 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
39
40
41
FROM node:16.15.1
# Set environment variables
ENV PNPM_HOME="/root/.local/share/pnpm"
ENV PATH="${PATH}:${PNPM_HOME}"
WORKDIR /app
# Install dependencies
RUN npm install --global pnpm && \
SHELL=bash pnpm setup && \
pnpm install -g pm2 && \
mkdir /app/config
# Install nginx
RUN apt-get update && \
apt-get install -y nginx && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /etc/nginx/sites-enabled/default && \
rm -rf /etc/nginx/sites-available/default && \
rm -rf /etc/nginx/nginx.conf
# Add nginx config
COPY config/nginx.conf /etc/nginx/nginx.conf
# Add src
COPY assets assets
COPY config/default.json config/default.json
COPY packages packages
COPY entrypoint.sh entrypoint.sh
COPY package.json package.json
COPY tsconfig.json tsconfig.json
COPY tsconfig.base.json tsconfig.base.json
COPY tsconfig.project.json tsconfig.project.json
COPY pnpm-workspace.yaml pnpm-workspace.yaml
# Build
RUN pnpm i
RUN pnpm run build && \
chmod +x entrypoint.sh
CMD [ "./entrypoint.sh" ]