-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 905 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 905 Bytes
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
FROM --platform=$BUILDPLATFORM node:25.2.1-alpine AS build
WORKDIR /app
ENV CYPRESS_INSTALL_BINARY=0
COPY package*.json ./
COPY patches/ ./patches/
RUN npm ci --unsafe-perm
COPY . .
RUN NODE_ENV=production npm run build:with-font
FROM caddy:2.10.0-alpine
EXPOSE 80
COPY build/docker/Caddyfile /etc/caddy/Caddyfile
COPY build/docker/startup.sh /startup.sh
RUN chmod 755 /startup.sh
COPY --from=build /app/dist /usr/share/caddy
ENV APP_NAME=traQ
ENV THEME_COLOR=#0D67EA
# 設定上書き処理用に、.brを消して、元の設定を別のディレクトリに保存しておく
RUN cd /usr/share/caddy && \
mkdir -p /app/default && \
mkdir -p /app/default/img && \
rm index.html.br && \
cp config.js defaultTheme.js index.html manifest.webmanifest /app/default && \
cp -r img/icons img/services /app/default/img
RUN mkdir -p /app/override
VOLUME ["/app/override"]
CMD ["/startup.sh"]