-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.dev
More file actions
44 lines (33 loc) · 1.11 KB
/
Dockerfile.dev
File metadata and controls
44 lines (33 loc) · 1.11 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
44
# Base image
FROM node:20-alpine
# Set the working directory
WORKDIR /app
RUN corepack enable
RUN corepack prepare pnpm@9.12.1 --activate
# Copy package.json and pnpm lock file
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json tsconfig.base.json ./
# Install pnpm and dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm fetch \
| grep -v "cross-device link not permitted\|Falling back to copying packages from store"
# Copy the rest of the application code
COPY frontend ./frontend
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm i \
--recursive \
--prefer-offline \
--frozen-lockfile
# Expose the frontend port
EXPOSE 5100
# Adding build time environment variables for script
ARG VITE_SCRIPT_API_URL
ARG VITE_SCRIPT_FRONTEND_URL
ARG VITE_SCRIPT_ILPAY_URL
ARG VITE_INIT_SCRIPT_URL
ENV VITE_SCRIPT_API_URL=$VITE_SCRIPT_API_URL \
VITE_SCRIPT_FRONTEND_URL=$VITE_SCRIPT_FRONTEND_URL \
VITE_SCRIPT_ILPAY_URL=$VITE_SCRIPT_ILPAY_URL \
VITE_INIT_SCRIPT_URL=$VITE_INIT_SCRIPT_URL
WORKDIR /app/frontend
# Command to run the Remix app with Vite
CMD ["pnpm", "run", "dev"]