mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-07-04 00:47:37 +00:00
Change provider from npm to nginx
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -15,9 +15,15 @@ COPY package.json .
|
||||
COPY package-lock.json* .
|
||||
RUN npm ci
|
||||
|
||||
FROM node:22-slim
|
||||
FROM node:22-slim AS quartz
|
||||
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"]
|
||||
RUN npx quartz build
|
||||
|
||||
FROM nginx:latest
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY --from=quartz /usr/src/app/public/ /usr/share/nginx/html/
|
||||
WORKDIR /etc/nginx/
|
||||
COPY custom/nginx/default.conf /etc/nginx/conf.d/
|
7
custom/compose.yaml
Normal file
7
custom/compose.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
|
||||
web:
|
||||
image: quartz-jpg
|
||||
container_name: quartz-jpg
|
||||
ports:
|
||||
- "8080:80"
|
@ -1,12 +0,0 @@
|
||||
services:
|
||||
quartz:
|
||||
image: quartz-jpg
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
container_name: quartz-jpg-container
|
||||
restart: always
|
||||
ports:
|
||||
- 8080:8080
|
3
custom/init-repos.sh
Normal file
3
custom/init-repos.sh
Normal file
@ -0,0 +1,3 @@
|
||||
git remote add content https://git.marchal.dev/keb/jpg-content.git
|
||||
git remote add convert-furigana https://git.marchal.dev/keb/jpg-convert-furigana.git
|
||||
git remote add convert-usage https://git.marchal.dev/keb/jpg-convert-usage.git
|
13
custom/nginx/default.conf
Normal file
13
custom/nginx/default.conf
Normal file
@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html
|
||||
error_page 404 /404.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user