fix(dockerfile): fix next not found on development service

This commit is contained in:
sauravniraula 2025-06-24 19:55:21 +05:45
parent ed2d77a1dc
commit fae038121a
No known key found for this signature in database
GPG key ID: 60FCC1B5A5E83326
3 changed files with 13 additions and 6 deletions

View file

@ -6,4 +6,5 @@ out
build
.git
.gitignore
tmp
tmp
debug

3
.gitignore vendored
View file

@ -7,4 +7,5 @@ __pycache__
node_modules
out
user_data
tmp
tmp
debug

View file

@ -24,9 +24,8 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
COPY servers/fastapi/requirements.txt ./
RUN pip install -r requirements.txt
# Install dependencies for Next.js
WORKDIR /app/servers/nextjs
WORKDIR /node_dependencies
COPY servers/nextjs/package.json servers/nextjs/package-lock.json ./
RUN npm install
@ -37,7 +36,13 @@ RUN npx puppeteer browsers install chrome --install-deps
COPY nginx.conf /etc/nginx/nginx.conf
# Expose the port
EXPOSE 80 3000 8000 6379
EXPOSE 80 3000 8000
# Start the servers
CMD ["/bin/bash", "-c", "ollama serve & service nginx start & service redis-server start && node /app/start.js"]
CMD ["/bin/bash", "-c", "\
rm -rf /app/servers/nextjs/node_modules && \
ln -s /node_dependencies/node_modules /app/servers/nextjs/node_modules && \
ollama serve & \
service nginx start & \
service redis-server start && \
node /app/start.js"]