-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·46 lines (29 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
executable file
·46 lines (29 loc) · 1.04 KB
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
39
40
41
42
43
44
45
46
FROM php:8.4.14-cli-alpine3.21 AS builder
ARG PHRASEA_REFNAME
ARG PHRASEA_REFTYPE
ARG PHRASEA_DATETIME
ARG SITE_NAME="Phrasea Documentation"
ARG SITE_URL="https://doc.phrasea.com"
RUN apk add --no-interactive \
git \
nodejs \
npm \
&& npm install -g pnpm@^10.20.0 \
&& adduser -D -u 1000 app
COPY --from=composer:2.5.8 /usr/bin/composer /usr/bin/composer
USER app
COPY --chown=app:app ./docusaurus/phrasea /srv/docusaurus/phrasea
WORKDIR /srv/docusaurus/phrasea
RUN pnpm install
WORKDIR /srv/builder
COPY --chown=app:app ./builder /srv/builder
RUN composer install --no-dev --optimize-autoloader
FROM builder AS build-docs
COPY --chown=app:app ./downloads /srv/downloads
RUN ["php", "application.php", "-vvv", "build"]
FROM nginx:1.29.3-alpine3.22
ARG PHRASEA_REFTYPE
ENV URL=https://doc.phrasea.com
COPY ./docusaurus/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY ./docusaurus/nginx/headers-${PHRASEA_REFTYPE}.conf /etc/nginx/conf.d/
COPY --from=build-docs /srv/docusaurus/phrasea/build/ /usr/share/nginx/html/