Skip to content
Snippets Groups Projects
Commit 04a0a285 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

fixed

parent 7848dc69
Branches main
No related tags found
No related merge requests found
FROM ghcr.io/enricoros/big-agi:development
FROM node:22-alpine
RUN apk add --no-cache git
RUN apk add --no-cache openssl
WORKDIR /app
RUN mv middleware_BASIC_AUTH.ts middleware.ts
RUN git clone https://github.com/enricoros/big-AGI.git .
RUN if [ -f middleware_BASIC_AUTH.ts ]; then \
mv middleware_BASIC_AUTH.ts middleware.ts; \
fi
# Build the application
ENV NODE_ENV=development
RUN npm ci
ENV NODE_ENV=production
RUN npm run build
# Copy Built app
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=builder --chown=nextjs:nodejs /app/src/server/prisma ./src/server/prisma
# Reduce installed packages to production-only
RUN npm prune --production
ENV NODE_ENV=production
ENV PATH=$PATH:/app/node_modules/.bin
EXPOSE 3000
# Start the application
CMD ["next", "start"]
\ No newline at end of file
services:
big-agi:
build: .
build:
context: .
dockerfile: Dockerfile
ports:
- "1004:3000"
command: [ "next", "start", "-p", "3000" ]
......@@ -14,6 +16,8 @@ services:
restart: unless-stopped
environment:
- POSTGRES_PRISMA_URL=postgresql://bigagi:${POSTGRES_PASSWORD}@postgres:5432/bigagi?schema=public
- HTTP_BASIC_AUTH_USERNAME=${HTTP_BASIC_AUTH_USERNAME}
- HTTP_BASIC_AUTH_PASSWORD=${HTTP_BASIC_AUTH_PASSWORD}
depends_on:
- postgres
......@@ -38,3 +42,6 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
command: --schedule "0 0 * * *" --cleanup
restart: unless-stopped
volumes:
postgres_data:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment