-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (33 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
48 lines (33 loc) · 1.22 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
47
48
FROM node:22-alpine AS frontend
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ .
RUN npm run build
FROM php:8.4-cli
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
jq \
libffi-dev \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install ffi pcntl
RUN pecl install opentelemetry && docker-php-ext-enable opentelemetry
WORKDIR /app
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-interaction && \
apt-get purge -y unzip && apt-get autoremove -y
RUN vendor/bin/piper-tts install-deps
COPY app/ app/
COPY config/ config/
COPY support/ support/
COPY start.php download-models.sh entrypoint.sh ./
RUN chmod +x entrypoint.sh download-models.sh
COPY --from=frontend /app/view/index.html app/view/index.html
RUN mkdir -p models && \
curl -sL -o models/voices.json https://huggingface.co/rhasspy/piper-voices/resolve/main/voices.json
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8000/api/health || exit 1
ENTRYPOINT ["./entrypoint.sh"]