WebSocket app
This commit is contained in:
8
ws/docker/PHP.Dockerfile
Normal file
8
ws/docker/PHP.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM php:7.4-fpm
|
||||
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
RUN pecl install xdebug-3.0.3 \
|
||||
&& docker-php-ext-enable xdebug
|
||||
|
||||
CMD ["php", "/code/ws/public/index.php"]
|
16
ws/docker/nginx.conf
Normal file
16
ws/docker/nginx.conf
Normal file
@ -0,0 +1,16 @@
|
||||
upstream websocket {
|
||||
server ws-php:9010;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
proxy_pass http://websocket;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user