mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-13 04:54:24 +01:00
Cleanup root dir, move dev-related files into /documents/ (#347)
* chore: cleanup root dir and move extraneous dev related files to documents/dev * chore: cleanup root dir and move extraneous dev related files to documents/dev
This commit is contained in:
parent
8d4ef16b7f
commit
791b515937
4 changed files with 5 additions and 0 deletions
35
documents/dev/Dockerfile-app
Normal file
35
documents/dev/Dockerfile-app
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# ./Dockerfile
|
||||
|
||||
FROM node:19-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json files for client and api
|
||||
COPY /client/package*.json /app/client/
|
||||
COPY /api/package*.json /app/api/
|
||||
COPY /package*.json /app/
|
||||
|
||||
# Install dependencies for both client and api
|
||||
RUN npm ci
|
||||
|
||||
# Copy the current directory contents into the container
|
||||
COPY /client/ /app/client/
|
||||
COPY /api/ /app/api/
|
||||
|
||||
# Set the memory limit for Node.js
|
||||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||
|
||||
# Build artifacts for the client
|
||||
RUN cd /app/client && npm run build
|
||||
|
||||
# Create the necessary directory and copy the client side code to the api directory
|
||||
RUN mkdir -p /app/api/client && cp -R /app/client/dist /app/api/client/dist
|
||||
|
||||
# Make port 3080 available to the world outside this container
|
||||
EXPOSE 3080
|
||||
|
||||
# Expose the server to 0.0.0.0
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
# Run the app when the container launches
|
||||
WORKDIR /app/api
|
||||
CMD ["npm", "start"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue