-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
36 lines (31 loc) · 1.34 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
# stage 1 : prepare the sources
FROM node:16-alpine as build
ENV GENERATE_SOURCEMAP false
COPY . /src/apps-master
RUN apk add --no-cache curl \
&& mkdir -p /src \
&& cd /src \
&& curl -L -o fgo-lookup.tar.gz https://github.com/jycl1234/fgo-lookup/archive/master.tar.gz \
&& tar -zxvf fgo-lookup.tar.gz \
&& mkdir -p /app/ && cp -r fgo-lookup-master/dist /app/drop-lookup \
&& cd /src \
&& curl -L -o drop-serializer.tar.gz https://github.com/atlasacademy/drop-serializer-react/archive/master.tar.gz \
&& tar -zxvf drop-serializer.tar.gz \
&& cd drop-serializer-react-master && npm ci && npm run build \
&& mkdir -p /app/ && cp -r ./build/ /app/drop-serializer \
&& cd /src \
&& cd apps-master/packages/db && npm ci && npm run build \
&& mkdir -p /app/ && cp -r ./build/ /app/db \
&& cd /src \
&& cd apps-master/packages/paper-moon && npm ci && npm run build \
&& mkdir -p /app/ && cp -r ./build/ /app/paper-moon
# stage 2 : copy & fire things up
FROM webdevops/nginx
COPY ./build/no-cache.conf /opt/docker/etc/nginx/vhost.common.d/10-no-cache.conf
COPY ./build/gzip.conf /opt/docker/etc/nginx/conf.d/20-gzip.conf
COPY ./build/db.conf /opt/docker/etc/nginx/vhost.common.d/30-db.conf
COPY ./build/index.html /app/index.html
COPY ./build/robots.txt /app/robots.txt
COPY --from=build /app/ /app/
RUN chown -R 1000:1000 /app
ENV WEB_DOCUMENT_INDEX=index.html