-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
39 lines (31 loc) · 1.09 KB
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
FROM node as builder
# These are ARGs because nuxt bakes them into its minified version of the JS,
# So they are actually set at build time vs. run-time
#
ARG VITE_TDEI_API_URL
ARG VITE_TDEI_USER_API_URL
ARG VITE_API_URL
ARG VITE_NEW_API_URL
ARG VITE_OSM_URL
ARG VITE_RAPID_URL
ARG VITE_RAPID3_URL
ARG VITE_PATHWAYS_EDITOR_URL
ARG VITE_IMAGERY_SCHEMA
ARG VITE_IMAGERY_EXAMPLE_URL
ARG VITE_LONG_FORM_QUEST_SCHEMA
ARG VITE_LONG_FORM_QUEST_EXAMPLE_URL
ARG VITE_SENTRY_AUTH_TOKEN
ARG VITE_SENTRY_DSN
ARG CODE_VERSION=unknown
WORKDIR /app/
COPY . .
RUN npm install
RUN npm run generate
FROM nginx
COPY --from=builder /app/.output/public /usr/share/nginx/html/
# https://stackoverflow.com/questions/44438637/arg-substitution-in-run-command-not-working-for-dockerfile
ARG CODE_VERSION
RUN echo "This is (frontend, api, cgimap, osmrails, pathways, rapid, taskingmanager) $CODE_VERSION"
RUN echo "This is (frontend, api, cgimap, osmrails, pathways, rapid, taskingmanager) $CODE_VERSION" > /usr/share/nginx/html/VERSION
RUN chown -R nginx:nginx /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf