File size: 862 Bytes
be3cfca
 
37a328f
be3cfca
 
 
 
2af4df0
be3cfca
 
2af4df0
 
 
 
 
be3cfca
41abe6f
 
 
 
9d29ac8
2af4df0
41abe6f
 
2af4df0
 
be3cfca
2af4df0
41abe6f
34eadaa
2af4df0
 
 
41abe6f
 
 
2af4df0
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
FROM node:22-bookworm-slim AS static-assets

ARG ESBUILD_VERSION=0.28.2

WORKDIR /build

RUN npm install --global "esbuild@${ESBUILD_VERSION}" \
  && test "$(esbuild --version)" = "${ESBUILD_VERSION}"

COPY static/ /build/static/

RUN cp -a static /out \
  && esbuild static/app.js --minify --target=es2019 --charset=utf8 --legal-comments=none --outfile=/out/app.js \
  && esbuild static/style.css --minify --outfile=/out/style.css \
  && esbuild static/sw.js --minify --target=es2019 --charset=utf8 --legal-comments=none --outfile=/out/sw.js

FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY app.py build_fulltext_db.py prepare_fulltext_index.py start.sh ./

COPY --from=static-assets /out/ static/

COPY data/ data/

COPY CCRD/ CCRD/

COPY CW/ CW/

EXPOSE 7860

CMD ["sh", "/app/start.sh"]