mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00

* refactor: post-cleanup changes: - add more unnecessary paths to .dockerignore - remove librechat.yaml from main compose file (prevents from being required) - do not create librechat.yaml during build (does nothing) * docs: make config file instructions easier to read, more info throughout other docs * docs: add custom config to menu * Update custom_config.md * Update docker_compose_install.md
28 lines
690 B
Docker
28 lines
690 B
Docker
# Base node image
|
|
FROM node:18-alpine AS node
|
|
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
# Allow mounting of these files, which have no default
|
|
# values.
|
|
RUN touch .env
|
|
# Install call deps - Install curl for health check
|
|
RUN apk --no-cache add curl && \
|
|
npm ci
|
|
|
|
# React client build
|
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
|
RUN npm run frontend
|
|
|
|
# Node API setup
|
|
EXPOSE 3080
|
|
ENV HOST=0.0.0.0
|
|
CMD ["npm", "run", "backend"]
|
|
|
|
# Optional: for client with nginx routing
|
|
# FROM nginx:stable-alpine AS nginx-client
|
|
# WORKDIR /usr/share/nginx/html
|
|
# COPY --from=node /app/client/dist /usr/share/nginx/html
|
|
# COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
|
# ENTRYPOINT ["nginx", "-g", "daemon off;"]
|