forked from OpenRailwayMap/OpenRailwayMap-CartoCSS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
proxy.Dockerfile
38 lines (27 loc) · 1.03 KB
/
proxy.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:22-alpine as build-yaml
WORKDIR /build
RUN npm install yaml
FROM build-yaml as build-styles
ARG PUBLIC_PROTOCOL
ARG PUBLIC_HOST
RUN --mount=type=bind,source=proxy/js/styles.mjs,target=styles.mjs \
--mount=type=bind,source=features,target=features \
node /build/styles.mjs
FROM build-yaml as build-features
RUN --mount=type=bind,source=proxy/js/features.mjs,target=features.mjs \
--mount=type=bind,source=features,target=features \
node /build/features.mjs \
> /build/features.json
FROM nginx:1-alpine
COPY proxy/proxy.conf.template /etc/nginx/templates/proxy.conf.template
COPY proxy/manifest.json /etc/nginx/public/manifest.json
COPY proxy/index.html /etc/nginx/public/index.html
COPY proxy/api /etc/nginx/public/api
COPY proxy/js /etc/nginx/public/js
COPY proxy/css /etc/nginx/public/css
COPY proxy/image /etc/nginx/public/image
COPY data/import /etc/nginx/public/import
COPY --from=build-styles \
/build /etc/nginx/public/style
COPY --from=build-features \
/build/features.json /etc/nginx/public/features.json