forked from github-copilot-resources/copilot-metrics-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.Dockerfile
31 lines (26 loc) · 891 Bytes
/
api.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
29
30
31
# Stage 1: Build the Vue.js application
FROM node:14 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# this will tokenize the app
RUN npm run build
# Stage 2: Prepare the Node.js API
FROM node:14 as api-stage
WORKDIR /api
# Copy package.json and other necessary files for the API
COPY api/package*.json ./
RUN npm install
# Copy the rest of your API source code
COPY api/ .
# Copy the built Vue.js app from the previous stage
COPY --from=build-stage /app/dist /api/public
COPY --from=build-stage /app/dist/assets/app-config.js /api/app-config.template.js
# install gettext-base for envsubst
RUN apt-get update && apt-get install -y gettext-base
# Expose the port your API will run on
EXPOSE 3000
# Command to run your API (and serve your Vue.js app)
RUN chmod +x /api/docker-entrypoint.api/entrypoint.sh
ENTRYPOINT ["/api/docker-entrypoint.api/entrypoint.sh"]