Add media proxy to docker container
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
FROM node:22-alpine AS build
|
FROM node:22-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY client/package.json client/package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
COPY . .
|
COPY client/ .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:alpine
|
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 --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
|
EXPOSE 80
|
||||||
|
CMD ["sh", "-c", "php-fpm83 && exec nginx -g 'daemon off;'"]
|
||||||
|
|||||||
@@ -5,6 +5,19 @@ server {
|
|||||||
|
|
||||||
resolver 127.0.0.11 valid=10s;
|
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 {
|
location /ws {
|
||||||
set $server_upstream http://server:4474;
|
set $server_upstream http://server:4474;
|
||||||
proxy_pass $server_upstream;
|
proxy_pass $server_upstream;
|
||||||
|
|||||||
@@ -26,8 +26,13 @@ services:
|
|||||||
- livekit
|
- livekit
|
||||||
|
|
||||||
client:
|
client:
|
||||||
build: ./client
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: client/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- CHGRID_HOST_ORIGIN=${CHGRID_HOST_ORIGIN:-http://localhost}
|
||||||
|
- CHGRID_MEDIA_PROXY_SESSION_CHECK_URL=http://server:4474/auth/session/check
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:4474:80"
|
- "127.0.0.1:4474:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user