mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-01-14 22:18:43 +00:00
Apply convert scripts in Dockerfile
This commit is contained in:
parent
242bd75378
commit
1ce534d696
12
Dockerfile
12
Dockerfile
@ -1,3 +1,14 @@
|
||||
FROM python:latest as convert
|
||||
WORKDIR /usr/src/app
|
||||
COPY content/ ./
|
||||
COPY custom/convert-furigana/program/convert-furigana.py ./
|
||||
COPY custom/convert-usage/program/convert-usage.py ./
|
||||
ENV PIP_ROOT_USER_ACTION=ignore
|
||||
RUN python -m pip install --upgrade pip
|
||||
RUN python -m pip install beautifulsoup4
|
||||
RUN python convert-furigana.py .
|
||||
RUN python convert-usage.py .
|
||||
|
||||
FROM node:20-slim as builder
|
||||
WORKDIR /usr/src/app
|
||||
COPY package.json .
|
||||
@ -8,4 +19,5 @@ FROM node:20-slim
|
||||
WORKDIR /usr/src/app
|
||||
COPY --from=builder /usr/src/app/ /usr/src/app/
|
||||
COPY . .
|
||||
COPY --from=convert /usr/src/app/ /usr/src/app/content/
|
||||
CMD ["npx", "quartz", "build", "--serve"]
|
||||
|
@ -8,7 +8,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
container_name: quartz
|
||||
container_name: quartz-jpg-container
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
Loading…
Reference in New Issue
Block a user