-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
38 lines (24 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
FROM node:latest as prebuild-env
WORKDIR /tmp/github.com/tarkov-database/website
COPY . .
RUN npm ci
RUN npx tsc
FROM golang:1.21.6-bullseye as build-env
WORKDIR /tmp/github.com/tarkov-database/website
COPY --from=prebuild-env /tmp/github.com/tarkov-database/website .
RUN make bin && \
mkdir -p /usr/share/tarkov-database/website && \
mv -t /usr/share/tarkov-database/website frontendserver
RUN mkdir -p /usr/share/tarkov-database/website/view && \
mv -t /usr/share/tarkov-database/website/view view/templates
RUN make statics && \
mkdir -p /usr/share/tarkov-database/website/static && \
mv -t /usr/share/tarkov-database/website/static static/dist
FROM gcr.io/distroless/base-debian11
LABEL homepage="https://tarkov-database.com"
LABEL repository="https://github.com/tarkov-database/website"
LABEL maintainer="Markus Wiegand <mail@morphy2k.dev>"
LABEL org.opencontainers.image.source="https://github.com/tarkov-database/website"
COPY --from=build-env /usr/share/tarkov-database/website /
EXPOSE 8080
CMD ["/frontendserver"]