-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.railway
46 lines (30 loc) · 1.03 KB
/
Dockerfile.railway
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
FROM node:14.17.6 AS build
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build
FROM node:14.17.6-alpine AS release
LABEL maintainer="xkrfer <[email protected]>"
WORKDIR /release
COPY docker .
COPY package.json .
RUN npm install --production \
&& npm install -g pm2 \
&& echo "http://dl-cdn.alpinelinux.org/alpine/v3.14/main/" > /etc/apk/repositories \
&& apk update \
&& apk upgrade \
&& apk add --no-cache openrc\
&& apk add --no-cache bash bash-doc bash-completion \
&& apk add --no-cache tzdata openrc libc6-compat\
&& apk add --no-cache redis \
&& cp redis.conf /usr/bin/redis.conf \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& wget https://github.com/appleboy/gorush/releases/download/v1.15.0/gorush-v1.15.0-linux-amd64 -O /release/push/gorush \
&& chmod +x /release/push/gorush \
&& chmod +x start.sh \
&& rm -rf /var/cache/apk/*
COPY --from=build /app/dist dist
COPY static static
EXPOSE 8800
ENTRYPOINT ["/bin/sh", "start.sh", "railway"]