2026-03-11 16:06:41 +01:00
|
|
|
FROM node:22-alpine AS build
|
|
|
|
|
WORKDIR /app
|
2026-03-12 00:07:55 +01:00
|
|
|
COPY client/package.json client/package-lock.json ./
|
2026-03-11 16:06:41 +01:00
|
|
|
RUN npm ci
|
2026-03-12 00:07:55 +01:00
|
|
|
COPY client/ .
|
2026-03-11 16:06:41 +01:00
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
FROM nginx:alpine
|
2026-03-12 00:07:55 +01:00
|
|
|
RUN apk add --no-cache php83 php83-fpm php83-curl php83-ctype
|
|
|
|
|
RUN echo 'clear_env = no' >> /etc/php83/php-fpm.d/www.conf
|
2026-03-11 16:06:41 +01:00
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
2026-03-12 00:07:55 +01:00
|
|
|
COPY deploy/php/media_proxy.php /usr/share/nginx/html/media_proxy.php
|
2026-03-12 16:14:19 +01:00
|
|
|
COPY deploy/php/sounds_list.php /usr/share/nginx/html/sounds_list.php
|
2026-03-12 00:07:55 +01:00
|
|
|
COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
2026-03-11 16:06:41 +01:00
|
|
|
EXPOSE 80
|
2026-03-12 16:55:00 +01:00
|
|
|
CMD ["sh", "-c", "find /usr/share/nginx/html/sounds/widgets -type d -exec chmod 755 {} \\; 2>/dev/null; find /usr/share/nginx/html/sounds/widgets -type f -exec chmod 644 {} \\; 2>/dev/null; php-fpm83 && exec nginx -g 'daemon off;'"]
|