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 RUN apk add --no-cache openssl
WORKDIR /app 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 ENV NODE_ENV=production
RUN npm run build RUN npm run build
# Copy Built app # Reduce installed packages to production-only
COPY --from=builder --chown=nextjs:nodejs /app/public ./public RUN npm prune --production
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules ENV NODE_ENV=production
COPY --from=builder --chown=nextjs:nodejs /app/src/server/prisma ./src/server/prisma ENV PATH=$PATH:/app/node_modules/.bin
EXPOSE 3000
# Start the application # Start the application
CMD ["next", "start"] CMD ["next", "start"]
\ No newline at end of file
services: services:
big-agi: big-agi:
build: . build:
context: .
dockerfile: Dockerfile
ports: ports:
- "1004:3000" - "1004:3000"
command: [ "next", "start", "-p", "3000" ] command: [ "next", "start", "-p", "3000" ]
...@@ -14,6 +16,8 @@ services: ...@@ -14,6 +16,8 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
- POSTGRES_PRISMA_URL=postgresql://bigagi:${POSTGRES_PASSWORD}@postgres:5432/bigagi?schema=public - 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: depends_on:
- postgres - postgres
...@@ -38,3 +42,6 @@ services: ...@@ -38,3 +42,6 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
command: --schedule "0 0 * * *" --cleanup command: --schedule "0 0 * * *" --cleanup
restart: unless-stopped 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