-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (23 loc) · 973 Bytes
/
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
FROM node:lts-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN apk add --no-cache python3 make g++
RUN npm install
COPY . .
# SET ENV VARS FOR REPLACE
ENV VUE_APP_PUBLIC_PATH=VUE_APP_PUBLIC_PATH_ENV
ENV VUE_APP_API_KEY=VUE_APP_API_KEY_ENV
ENV VUE_APP_FIREBASE_API_KEY=VUE_APP_FIREBASE_API_KEY_ENV
ENV VUE_APP_FIREBASE_AUTH_DOMAIN=VUE_APP_FIREBASE_AUTH_DOMAIN_ENV
ENV VUE_APP_FIREBASE_DATABASE_URL=VUE_APP_FIREBASE_DATABASE_URL_ENV
ENV VUE_APP_FIREBASE_PROJECT_ID=VUE_APP_FIREBASE_PROJECT_ID_ENV
ENV VUE_APP_STORAGE_BUCKET=VUE_APP_STORAGE_BUCKET_ENV
ENV VUE_APP_FIREBASE_MESSAGING_SENDER_ID=VUE_APP_FIREBASE_MESSAGING_SENDER_ID_ENV
ENV VUE_APP_FIREBASE_APP_ID=VUE_APP_FIREBASE_APP_ID_ENV
ENV VUE_APP_FIREBASE_MEASURMENT_ID=VUE_APP_FIREBASE_MEASURMENT_ID_ENV
RUN npm run build
FROM nginx:stable-alpine as production
COPY --from=builder /app/dist /usr/share/nginx/html
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]