Skip to content

Commit 9bfed95

Browse files
committed
dockerfile
1 parent 966fb8a commit 9bfed95

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

Dockerfile

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,49 @@
1-
FROM node:18-bullseye AS builder
1+
FROM node:20-bullseye AS builder
22
WORKDIR /app
33
COPY package.json next.config.js ./
4-
RUN yarn install
4+
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
libcairo2-dev \
8+
libpango1.0-dev \
9+
libjpeg-dev \
10+
libgif-dev \
11+
librsvg2-dev \
12+
python3 \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
16+
# A bunch of canvas bs
17+
ENV npm_config_canvas_binary_host_mirror=https://github.com/Automattic/node-canvas/releases/download/
18+
ENV CXXFLAGS="-DSYZX_FEATURE_FLAG=1"
19+
20+
COPY package.json yarn.lock* ./
21+
RUN yarn install --network-timeout 100000 || \
22+
(echo "Retrying with canvas workaround..." && \
23+
yarn add canvas@2.11.2 --network-timeout 100000 && \
24+
yarn install --network-timeout 100000)
25+
26+
527
COPY . .
628
RUN yarn build
729

830

9-
FROM node:18-bullseye
31+
FROM node:20-bullseye
1032
WORKDIR /app
33+
34+
RUN apt-get update && apt-get install -y \
35+
libcairo2 \
36+
libpango-1.0-0 \
37+
libpangocairo-1.0-0 \
38+
libjpeg62-turbo \
39+
libgif7 \
40+
librsvg2-2 \
41+
&& rm -rf /var/lib/apt/lists/*
42+
1143
COPY --from=builder /app/.next ./.next
1244
COPY --from=builder /app/public ./public
1345
COPY --from=builder /app /app
46+
COPY --from=builder /app/node_modules ./node_modules
1447
COPY --from=builder /app/package.json ./package.json
1548
EXPOSE 3000
1649
RUN mkdir -p /auth

app/dashboard/CameraChart.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function CameraReadsChart({ data, loading }) {
7979
}}
8080
barGap={4}
8181
>
82-
<CartesianGrid vertical={false} strokeWidth={0.2} />
82+
<CartesianGrid vertical={false} strokeWidth={0.25} />
8383
<XAxis
8484
dataKey="camera"
8585
tickLine={false}
@@ -143,7 +143,7 @@ export function CameraReadsChart({ data, loading }) {
143143
</div>
144144
)}
145145
</CardContent>
146-
<CardFooter className="flex-col items-start gap-1 text-xs pt-2 md:pb-0">
146+
<CardFooter className="flex-col items-start gap-1 text-xs pt-2">
147147
<div className="flex gap-2 font-medium leading-none items-center">
148148
Most Active: {mostActiveCamera}
149149
<Camera className="h-4 w-4" />

0 commit comments

Comments
 (0)