mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-09 17:14:16 +01:00
fix(docker): send ROBOTS_NOINDEX as a header, make COMPRESSION_MODE work and fix the Docker guide example
This commit is contained in:
1 parent
1a6b38c077
commit
d8210be3c1
37 files changed
+244
-408
No files matched your search
@@ -77,14 +77,19 @@ podman-compose up -d
|
||||
# Dockerfile
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
ENV HUSKY=0
|
||||
COPY package*.json ./
|
||||
COPY vendor ./vendor
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginxinc/nginx-unprivileged:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/security-headers.conf /etc/nginx/security-headers.conf
|
||||
COPY --from=builder /app/security-headers-docs.conf /etc/nginx/security-headers-docs.conf
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
RUN mkdir -p /etc/nginx/tmp
|
||||
EXPOSE 8080
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
```
|
||||
@@ -118,6 +123,7 @@ docker run -d -p 3000:8080 bentopdf:custom
|
||||
| `DISABLE_GITHUB_STARS` | Omet la consulta del nombre d'estrelles de GitHub en carregar la pàgina i elimina `api.github.com` de la CSP. Les compilacions en mode simple sempre l'ometen. | `false` |
|
||||
| `SITE_URL` | URL pública escrita als enllaços canonical, hreflang i del mapa del lloc. Deixa-la per defecte tret que vulguis que els cercadors tractin el teu desplegament com un lloc propi. | `https://www.bentopdf.com` |
|
||||
| `ALLOW_INDEXING` | Amb un `SITE_URL` personalitzat, totes les pàgines es marquen com a `noindex` perquè la teva còpia no competeixi amb bentopdf.com als resultats de cerca. Defineix-ho a `true` perquè els cercadors l'indexin. | `false` |
|
||||
| `COMPRESSION_MODE` | Còpies precomprimides que es desen al costat de cada fitxer: `o` cap, `g` `.gz` (les serveix el nginx de la imatge), `b` `.br`, `all` totes dues. El nginx de la imatge no pot servir `.br`. | `o` |
|
||||
|
||||
Les URL dels mòduls WASM vénen preconfigurades amb CDN per defecte, així que totes les funcions avançades funcionen directament. Substitueix-les en desplegaments aïllats de la xarxa o autoallotjats.
|
||||
|
||||
|
||||
Reference in new issue
Block a user