File size: 919 Bytes
bbef364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a00794e
 
 
c8d5203
a00794e
 
bbef364
 
a00794e
bbef364
 
a00794e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ---- Base Node ----
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./

# ---- Dependencies ----
FROM base AS dependencies
RUN npm ci

# ---- Build ----
FROM dependencies AS build
COPY . .
RUN npm run build

# ---- Production ----
FROM node:20-alpine AS production
WORKDIR /app
COPY --from=dependencies /app/node_modules ./node_modules
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package*.json ./
COPY --from=build /app/next.config.js ./next.config.js
COPY --from=build /app/next-i18next.config.js ./next-i18next.config.js

# Set the environment variable
ENV DEFAULT_MODEL="mistral:latest"
ENV OLLAMA_HOST="http://localhost:7860"

# Install Ollama AI
RUN systemctl start docker
RUN apk add --no-cache docker-cli
RUN docker pull ollama/ollama:latest

# Expose the port the app will run on
EXPOSE 3000 7860

# Start the application
CMD ["npm", "start"]