Update Dockerfile
Browse files- Dockerfile +5 -28
Dockerfile
CHANGED
|
@@ -1,29 +1,6 @@
|
|
| 1 |
-
FROM node:19
|
| 2 |
-
RUN
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
COPY package*.json ./
|
| 6 |
-
# ---- Dependencies ----
|
| 7 |
-
FROM base AS dependencies
|
| 8 |
-
RUN npm ci
|
| 9 |
-
|
| 10 |
-
# ---- Build ----
|
| 11 |
-
FROM dependencies AS build
|
| 12 |
-
COPY . .
|
| 13 |
-
RUN npm run build
|
| 14 |
-
|
| 15 |
-
# ---- Production ----
|
| 16 |
-
FROM node:19-alpine AS production
|
| 17 |
-
WORKDIR /app
|
| 18 |
-
COPY --from=dependencies /app/node_modules ./node_modules
|
| 19 |
-
COPY --from=build /app/.next ./.next
|
| 20 |
-
COPY --from=build /app/public ./public
|
| 21 |
-
COPY --from=build /app/package*.json ./
|
| 22 |
-
COPY --from=build /app/next.config.js ./next.config.js
|
| 23 |
-
COPY --from=build /app/next-i18next.config.js ./next-i18next.config.js
|
| 24 |
-
|
| 25 |
-
# Expose the port the app will run on
|
| 26 |
EXPOSE 3000
|
| 27 |
-
|
| 28 |
-
# Start the application
|
| 29 |
-
CMD ["npm", "start"]
|
|
|
|
| 1 |
+
FROM node:19
|
| 2 |
+
RUN git clone https://github.com/sxqib/ChatGPT-with-Plugins.git
|
| 3 |
+
WORKDIR "ChatGPT-with-Plugins"
|
| 4 |
+
RUN yarn install && yarn build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
EXPOSE 3000
|
| 6 |
+
CMD yarn start
|
|
|
|
|
|