Optimize dockerfiles for speed

This commit is contained in:
Alessandro Dal Grande 2024-09-25 17:23:06 -07:00
parent 9b08782dd7
commit d85d9f164b
No known key found for this signature in database
GPG key ID: 1525AA5896744CF2
2 changed files with 12 additions and 6 deletions

View file

@ -7,9 +7,13 @@ ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
WORKDIR /home/perplexica
COPY ui /home/perplexica/
COPY ui/package.json /home/perplexica/
COPY ui/yarn.lock /home/perplexica/
RUN yarn install
COPY ui /home/perplexica/
RUN yarn build
CMD ["yarn", "start"]
CMD ["yarn", "start"]

View file

@ -5,16 +5,18 @@ ENV SEARXNG_API_URL=${SEARXNG_API_URL}
WORKDIR /home/perplexica
COPY package.json /home/perplexica/
COPY yarn.lock /home/perplexica/
RUN yarn install
COPY src /home/perplexica/src
COPY tsconfig.json /home/perplexica/
COPY config.toml /home/perplexica/
COPY drizzle.config.ts /home/perplexica/
COPY package.json /home/perplexica/
COPY yarn.lock /home/perplexica/
RUN mkdir /home/perplexica/data
RUN yarn install
RUN yarn build
CMD ["yarn", "start"]
CMD ["yarn", "start"]