WebSocket app

This commit is contained in:
2021-03-30 16:40:02 -03:00
parent 5d229739fe
commit 190dfd7c34
13 changed files with 314 additions and 0 deletions

8
ws/docker/PHP.Dockerfile Normal file
View 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
View 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;
}
}