forked from Kazetsukai/onetech
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
63 lines (40 loc) · 1.03 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM node:18-bookworm AS process
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /usr/local/twotech
RUN apt-get update && apt-get install \
--yes --no-install-recommends \
build-essential \
git \
gosu \
g++ \
imagemagick \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
libsox-fmt-mp3 \
sox \
&& rm -rf /var/lib/apt/lists/
COPY process/package*.json process/
COPY process/ process/
COPY public/ public/
#RUN node process download
FROM process AS build_env
WORKDIR /usr/local/twotech
COPY patch /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/bin/bash"]
FROM node:18-alpine AS build
WORKDIR /usr/local/twotech
RUN apk add --no-cache \
nginx
COPY package*.json ./
RUN npm clean-install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=process /usr/local/twotech/public/ /usr/share/nginx/html/
COPY --from=build /usr/local/twotech/public/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/nginx.conf
COPY twotech.twohoursonelife.com /etc/nginx/conf/
EXPOSE 80 443