Skip to content

Commit 2d52961

Browse files
authored
chore: update GAE flex websockets to use newer runtimes. (GoogleCloudPlatform#2030)
1 parent 9160740 commit 2d52961

File tree

4 files changed

+48
-7
lines changed

4 files changed

+48
-7
lines changed

appengine/flexible/websockets/additional-supervisord.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
[program:socket-server]
22
command = php %(ENV_APP_DIR)s/socket-server.php
33
enviroment = PORT="8000"
4-
stdout_logfile = /dev/stdout
5-
stdout_logfile_maxbytes=0
6-
stderr_logfile = /dev/stderr
7-
stderr_logfile_maxbytes=0
8-
user = root
94
autostart = true
105
autorestart = true
116
priority = 10

appengine/flexible/websockets/app.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ manual_scaling:
1616
# session_affinity: true
1717

1818
runtime_config:
19-
document_root: .
19+
document_root: .
20+
operating_system: ubuntu22
21+
runtime_version: 8.3

appengine/flexible/websockets/nginx-app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ location /ws {
99

1010
location / {
1111
# try to serve files directly, fallback to the front controller
12-
try_files $uri /$front_controller_file$is_args$args;
12+
try_files $uri /index.html$is_args$args;
1313
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
daemon off;
2+
3+
worker_processes auto;
4+
error_log /dev/stderr info;
5+
6+
7+
events {
8+
worker_connections 4096;
9+
}
10+
11+
12+
http {
13+
server_tokens off;
14+
default_type application/octet-stream;
15+
16+
client_max_body_size 32m;
17+
18+
access_log /dev/stdout;
19+
20+
sendfile on;
21+
22+
keepalive_timeout 650;
23+
keepalive_requests 10000;
24+
25+
map $http_x_forwarded_proto $fastcgi_https {
26+
default '';
27+
https on;
28+
}
29+
30+
31+
upstream php-fpm {
32+
server 127.0.0.1:9000 max_fails=3 fail_timeout=3s;
33+
}
34+
35+
server {
36+
37+
listen 8080;
38+
root /workspace/.;
39+
index index.php index.html index.htm;
40+
41+
42+
include /workspace/nginx-app.conf;
43+
}
44+
}

0 commit comments

Comments
 (0)