-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.dev
49 lines (36 loc) · 1.02 KB
/
Dockerfile.dev
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
45
46
47
48
49
FROM node:18-alpine
## ENV VARS
## CORE
ARG VITE_ENVIRONMENT
ENV VITE_ENVIRONMENT=${VITE_ENVIRONMENT}
ARG VITE_MAINTENANCE
ENV VITE_MAINTENANCE=${VITE_MAINTENANCE}
## APPWRITE DEV
ARG VITE_APPWRITE_ENDPOINT
ENV VITE_APPWRITE_ENDPOINT=${VITE_APPWRITE_ENDPOINT}
ARG VITE_APPWRITE_PROJECT_ID
ENV VITE_APPWRITE_PROJECT_ID=${VITE_APPWRITE_PROJECT_ID}
## APPWRITE PROD
ARG VITE_APPWRITE_ENDPOINT_PROD
ENV VITE_APPWRITE_ENDPOINT_PROD=${VITE_APPWRITE_ENDPOINT_PROD}
ARG VITE_APPWRITE_PROJECT_ID_PROD
ENV VITE_APPWRITE_PROJECT_ID_PROD=${VITE_APPWRITE_PROJECT_ID_PROD}
### STRIPE
ARG VITE_STRIPE_SECRET_KEY
ENV VITE_STRIPE_SECRET_KEY=${VITE_STRIPE_SECRET_KEY}
ARG VITE_STRIPE_PUBLIC_KEY
ENV VITE_STRIPE_PUBLIC_KEY=${VITE_STRIPE_PUBLIC_KEY}
WORKDIR /app
COPY package.json ./
RUN npm install -g pnpm vite
COPY . .
RUN pnpm install
RUN pnpm build
FROM node:18-alpine
WORKDIR /app
COPY --from=0 /app/package*.json ./
#RUN pnpm install --production --ignore-scripts
#RUN pnpm audit fix
COPY --from=0 /app ./
EXPOSE 3000
CMD ["node", "build"]