-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (64 loc) · 2.21 KB
/
Copy pathDockerfile
File metadata and controls
75 lines (64 loc) · 2.21 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM ghcr.io/trueforge-org/python-node:3.14.5@sha256:bd70ab5452391cebf1dbe34e8ec2d8ed08d9038a13295628863e49fc179a8c29 AS buildstage
# set version label
ARG VERSION
USER root
RUN \
echo "**** install packages ****" && \
apt-get update && apt-get install -y --no-install-recommends \
libgif7 \
libgsf-1-114 \
libvips42 && \
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-setuptools && \
echo "**** install planka ****" && \
mkdir -p /build && \
(curl -fL -o \
/tmp/planka.tar.gz \
"https://github.com/plankanban/planka/archive/refs/tags/v${VERSION}.tar.gz" || curl -fL -o \
/tmp/planka.tar.gz \
"https://github.com/plankanban/planka/archive/refs/tags/${VERSION}.tar.gz" || (PLANKA_RELEASE=$(curl -sX GET "https://api.github.com/repos/plankanban/planka/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && curl -fL -o \
/tmp/planka.tar.gz \
"https://github.com/plankanban/planka/archive/refs/tags/${PLANKA_RELEASE}.tar.gz")) && \
tar xf \
/tmp/planka.tar.gz -C \
/build --strip-components=1 && \
cd /build/server && \
npm install pnpm@9 --global && \
pnpm import && \
pnpm install --prod && \
cd /build/client && \
pnpm import && \
sed -i '/"node-sass"/d' package.json && \
pnpm add sass --save-dev && \
pnpm install --prod && \
DISABLE_ESLINT_PLUGIN=true npm run build && \
echo "**** cleanup ****" && \
apt-get autoremove -y && \
rm -rf \
$HOME/.cache \
$HOME/.local \
$HOME/.npm \
/tmp/*
FROM ghcr.io/trueforge-org/node:24.16.0@sha256:bb2868b1abbf270d15d8201d603205d5c0c978c078696cc10a442703fb808308
ARG VERSION
ARG TARGETARCH
USER root
COPY --from=buildstage /build/server/ /app
COPY --from=buildstage /build/server/.env.sample /app/.env
COPY --from=buildstage /build/client/dist /app/public/
COPY --from=buildstage /build/client/dist/index.html /app/views/index.ejs
RUN \
apt-get update && apt-get install -y --no-install-recommends \
postgresql-client && \
echo "**** create symlinks ****" && \
rm -rf /app/data && \
ln -s /config/data /app/data
# copy local files
USER apps
COPY --chmod=0755 . /
# ports and volumes
EXPOSE 1337
VOLUME /config
WORKDIR /config