Add media proxy to docker container
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
COPY client/package.json client/package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
COPY client/ .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
RUN apk add --no-cache php83 php83-fpm php83-curl php83-ctype
|
||||
RUN echo 'clear_env = no' >> /etc/php83/php-fpm.d/www.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY deploy/php/media_proxy.php /usr/share/nginx/html/media_proxy.php
|
||||
COPY client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
CMD ["sh", "-c", "php-fpm83 && exec nginx -g 'daemon off;'"]
|
||||
|
||||
@@ -5,6 +5,19 @@ server {
|
||||
|
||||
resolver 127.0.0.11 valid=10s;
|
||||
|
||||
location /auth/session/ {
|
||||
set $server_upstream http://server:4474;
|
||||
proxy_pass $server_upstream;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
set $server_upstream http://server:4474;
|
||||
proxy_pass $server_upstream;
|
||||
|
||||
Reference in New Issue
Block a user