Upload 3 files
Browse files- app.json +30 -0
- app.sh +11 -0
- nginx.conf +58 -0
app.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"log": {
|
3 |
+
"loglevel": "none"
|
4 |
+
},
|
5 |
+
"inbounds": [
|
6 |
+
{
|
7 |
+
"port": 8000,
|
8 |
+
"protocol": "VMESS",
|
9 |
+
"settings": {
|
10 |
+
"clients": [
|
11 |
+
{
|
12 |
+
"id": "3216cc34-b514-47c6-b82a-ccd37601a532"
|
13 |
+
}
|
14 |
+
],
|
15 |
+
"decryption": "none"
|
16 |
+
},
|
17 |
+
"streamSettings": {
|
18 |
+
"network": "ws",
|
19 |
+
"wsSettings": {
|
20 |
+
"path": "/login"
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
],
|
25 |
+
"outbounds": [
|
26 |
+
{
|
27 |
+
"protocol": "freedom"
|
28 |
+
}
|
29 |
+
]
|
30 |
+
}
|
app.sh
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
|
3 |
+
# run uwsgi
|
4 |
+
# notice: already "COPY app.json /etc/uwsgi/app.json" at Dockerfile
|
5 |
+
/usr/bin/uwsgi -config=/etc/uwsgi/app.json &
|
6 |
+
|
7 |
+
#run nginx
|
8 |
+
# CMD ["nginx", "-g", "daemon off;"]
|
9 |
+
nginx -g 'daemon off;'
|
10 |
+
# /usr/local/nginx/sbin/nginx -g 'daemon off;'
|
11 |
+
|
nginx.conf
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
pid /tmp/nginx.pid;
|
2 |
+
|
3 |
+
|
4 |
+
events {
|
5 |
+
worker_connections 1024;
|
6 |
+
}
|
7 |
+
|
8 |
+
http {
|
9 |
+
|
10 |
+
client_body_temp_path /tmp/client_temp;
|
11 |
+
proxy_temp_path /tmp/proxy_temp_path;
|
12 |
+
fastcgi_temp_path /tmp/fastcgi_temp;
|
13 |
+
uwsgi_temp_path /tmp/uwsgi_temp;
|
14 |
+
scgi_temp_path /tmp/scgi_temp;
|
15 |
+
|
16 |
+
|
17 |
+
include mime.types;
|
18 |
+
# default_type application/octet-stream;
|
19 |
+
sendfile on;
|
20 |
+
server_tokens off;
|
21 |
+
client_max_body_size 3000m;
|
22 |
+
|
23 |
+
|
24 |
+
server {
|
25 |
+
listen 80 default_server;
|
26 |
+
# listen $PORT default_server;
|
27 |
+
|
28 |
+
location / {
|
29 |
+
root /usr/local/html;
|
30 |
+
index index.html index.htm;
|
31 |
+
}
|
32 |
+
|
33 |
+
location /home {
|
34 |
+
return 200 "Welcome to my website!";
|
35 |
+
}
|
36 |
+
|
37 |
+
location /login {
|
38 |
+
proxy_redirect off;
|
39 |
+
proxy_pass http://127.0.0.1:8000;
|
40 |
+
proxy_http_version 1.1;
|
41 |
+
proxy_set_header Upgrade $http_upgrade;
|
42 |
+
proxy_set_header Connection "upgrade";
|
43 |
+
proxy_set_header Host $host;
|
44 |
+
proxy_set_header X-Real-IP $remote_addr;
|
45 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
46 |
+
# proxy_set_header X-Forwarded-Host $server_name;
|
47 |
+
|
48 |
+
# error_page 400=200 "Bad request is OK!";
|
49 |
+
# error_page 404=200 "Bad request is OK!";
|
50 |
+
}
|
51 |
+
|
52 |
+
location /healthCheck {
|
53 |
+
return 200 "OK!";
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|