-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (30 loc) · 1.46 KB
/
Copy pathDockerfile
File metadata and controls
43 lines (30 loc) · 1.46 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
40
41
42
43
FROM node:22-bookworm AS dev
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/* \
# NOTE: yarn > 1.22.19 breaks yarn-install invoked by pnpm
&& npm install -g pnpm@10.33.0 yarn@1.22.19 --force \
&& git config --global --add safe.directory /code
WORKDIR /code
# -------------------------- Nginx - Builder --------------------------------
FROM dev AS web-app-serve-build
COPY ./package.json ./pnpm-lock.yaml /code/
RUN pnpm install
COPY . /code/
# # Build variables (Requires backend pulled)
ENV APP_TITLE=ercs-eoc
ENV APP_ENVIRONMENT=development
ENV APP_GRAPHQL_ENDPOINT=http://localhost:8000
ENV APP_GRAPHQL_CODEGEN_ENDPOINT=./backend/schema.graphql
ENV APP_MAPBOX_TOKEN=APP_MAPBOX_TOKEN_PLACEHOLDER
ENV APP_GO_API=WEB_APP_SERVE_PLACEHOLDER__APP_GO_API_PLACEHOLDER
ENV APP_GO_URL=WEB_APP_SERVE_PLACEHOLDER__APP_GO_URL_PLACEHOLDER
ENV APP_GO_RISK_API_ENDPOINT=WEB_APP_SERVE_PLACEHOLDER__APP_GO_RISK_API_ENDPOINT_PLACEHOLDER
RUN pnpm generate:type && WEB_APP_SERVE_ENABLED=true pnpm build
# ---------------------------------------------------------------------------
FROM ghcr.io/toggle-corp/web-app-serve:v0.1.2 AS web-app-serve
LABEL maintainer="Togglecorp Dev"
LABEL org.opencontainers.image.source="https://github.com/ToogleCorp/ercs-client"
# Env for apply-config script
ENV APPLY_CONFIG__SOURCE_DIRECTORY=/code/build/
COPY --from=web-app-serve-build /code/build "$APPLY_CONFIG__SOURCE_DIRECTORY"