Skip to content

Commit 43a09e5

Browse files
committed
chore: Update Dockerfile and package versions to 1.9.4
1 parent adde6aa commit 43a09e5

File tree

3 files changed

+31
-27
lines changed

3 files changed

+31
-27
lines changed

Dockerfile

+29-25
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,39 @@
1-
# Build stage
2-
FROM node:18-slim AS build
1+
FROM node:18-slim AS base
32
WORKDIR /app
4-
RUN apt-get update && apt-get install -y --no-install-recommends \
5-
g++ make python3 wget gnupg dirmngr unzip \
6-
&& rm -rf /var/lib/apt/lists/*
7-
8-
RUN npm --no-update-notifier --no-fund --global install pnpm
9-
10-
COPY . .
11-
RUN pnpm install && pnpm build
3+
RUN apt update && apt install -y \
4+
g++ make python3 wget gnupg dirmngr unzip
125

136
# Server stage
14-
FROM node:18-slim AS server
15-
WORKDIR /app
7+
FROM base AS server
168
COPY ./server/ .
179
RUN yarn config set registry https://registry.npmjs.org/ && \
1810
yarn config set network-timeout 1200000 && \
1911
yarn install --frozen-lockfile && \
2012
yarn build
2113

14+
# Build stage
15+
FROM base AS build
16+
RUN npm --no-update-notifier --no-fund --global install pnpm
17+
COPY . .
18+
RUN pnpm install && pnpm build
19+
2220
# Final stage
2321
FROM node:18-slim
2422
WORKDIR /app
2523

24+
# Set environment variables
2625
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
2726
ENV NODE_ENV=production
28-
29-
RUN apt-get update && apt-get install -y --no-install-recommends \
30-
wget gnupg dirmngr curl ca-certificates git git-lfs openssh-client \
31-
jq cmake sqlite3 openssl psmisc python3 g++ make \
32-
&& rm -rf /var/lib/apt/lists/*
33-
34-
# Install Chrome based on architecture
35-
RUN ARCH=$(dpkg --print-architecture) && \
27+
# Install dependencies
28+
RUN apt update && apt install -y wget gnupg dirmngr unzip
29+
# Install dependencies and google chrome based on architecture
30+
RUN apt update && apt install -y wget gnupg dirmngr curl && \
31+
ARCH=$(dpkg --print-architecture) && \
3632
if [ "$ARCH" = "amd64" ]; then \
37-
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
38-
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
39-
apt-get update && apt-get install -y google-chrome-stable --no-install-recommends; \
33+
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
34+
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
35+
apt-get update && \
36+
apt-get install google-chrome-stable -y --no-install-recommends; \
4037
elif [ "$ARCH" = "arm64" ]; then \
4138
wget -q -O chromium-linux-arm64.zip 'https://playwright.azureedge.net/builds/chromium/1088/chromium-linux-arm64.zip' && \
4239
unzip chromium-linux-arm64.zip && \
@@ -46,9 +43,15 @@ RUN ARCH=$(dpkg --print-architecture) && \
4643
else \
4744
echo "Unsupported architecture: $ARCH" && exit 1; \
4845
fi && \
49-
rm -rf /var/lib/apt/lists/*
46+
rm -rf /var/lib/apt/lists/* \
47+
&& apt-get clean && rm -rf /var/lib/{apt,dpkg,cache,log}/
48+
49+
# Install other dependencies
50+
RUN apt update && apt install -y --no-install-recommends \
51+
ca-certificates git git-lfs openssh-client curl jq cmake sqlite3 openssl psmisc python3 g++ make && \
52+
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/
5053

51-
# Copy build artifacts
54+
# Copying build artifacts
5255
COPY --from=server /app/dist/ .
5356
COPY --from=server /app/prisma/ ./prisma
5457
COPY --from=server /app/package.json .
@@ -62,4 +65,5 @@ RUN yarn config set registry https://registry.npmjs.org/ && \
6265
yarn config set network-timeout 1200000 && \
6366
yarn install --production --frozen-lockfile
6467

68+
# Start the application
6569
CMD ["yarn", "start"]

app/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app",
33
"private": true,
4-
"version": "1.9.3",
4+
"version": "1.9.4",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dialoqbase",
3-
"version": "1.9.3",
3+
"version": "1.9.4",
44
"description": "Create chatbots with ease",
55
"scripts": {
66
"ui:dev": "pnpm run --filter ui dev",

0 commit comments

Comments
 (0)