nyanya
commited on
Commit
·
66b1835
1
Parent(s):
4f7adbd
caddy
Browse files- Caddyfile +8 -0
- Dockerfile +1 -5
- nginx.conf +0 -55
- packages.txt +0 -1
- start_server.sh +2 -1
Caddyfile
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
localhost:7860 {
|
2 |
+
reverse_proxy localhost:7860
|
3 |
+
}
|
4 |
+
|
5 |
+
localhost:7860/code {
|
6 |
+
reverse_proxy localhost:8080
|
7 |
+
}
|
8 |
+
|
Dockerfile
CHANGED
@@ -42,11 +42,6 @@ RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
|
42 |
&& chown -R user:user /app
|
43 |
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
|
44 |
|
45 |
-
#nginx
|
46 |
-
RUN mkdir -p /var/cache/nginx /var/log/nginx /var/lib/nginx && \
|
47 |
-
touch /var/run/nginx.pid && \
|
48 |
-
chown -R user:user /var/cache/nginx /var/log/nginx /var/lib/nginx /var/run/nginx.pid
|
49 |
-
|
50 |
# Fetch the latest version of OpenVSCode Server
|
51 |
RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest \
|
52 |
| grep "browser_download_url.*linux-x64.tar.gz" \
|
@@ -137,6 +132,7 @@ RUN --mount=target=requirements.txt,source=requirements.txt \
|
|
137 |
|
138 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
139 |
COPY --chown=user . $HOME/app
|
|
|
140 |
COPY --chown=user nginx.conf /etc/nginx/sites-available/default
|
141 |
|
142 |
RUN chmod +x start_server.sh
|
|
|
42 |
&& chown -R user:user /app
|
43 |
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
|
44 |
|
|
|
|
|
|
|
|
|
|
|
45 |
# Fetch the latest version of OpenVSCode Server
|
46 |
RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/latest \
|
47 |
| grep "browser_download_url.*linux-x64.tar.gz" \
|
|
|
132 |
|
133 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
134 |
COPY --chown=user . $HOME/app
|
135 |
+
COPY --chown=user --from=caddy:2-alpine /usr/bin/caddy /usr/bin/caddy
|
136 |
COPY --chown=user nginx.conf /etc/nginx/sites-available/default
|
137 |
|
138 |
RUN chmod +x start_server.sh
|
nginx.conf
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
server {
|
2 |
-
listen 4444 default_server;
|
3 |
-
listen [::]:4444 default_server;
|
4 |
-
|
5 |
-
server_name _; # Modify your domain name accordingly
|
6 |
-
|
7 |
-
location / {
|
8 |
-
# Serve GRADIO 7860
|
9 |
-
proxy_pass http://localhost:7860;
|
10 |
-
proxy_http_version 1.1;
|
11 |
-
proxy_set_header Upgrade $http_upgrade;
|
12 |
-
proxy_set_header Connection 'upgrade';
|
13 |
-
proxy_set_header Host $host;
|
14 |
-
proxy_set_header X-Real-IP $remote_addr;
|
15 |
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
16 |
-
proxy_cache_bypass $http_upgrade;
|
17 |
-
proxy_read_timeout 86400;
|
18 |
-
proxy_redirect off;
|
19 |
-
}
|
20 |
-
|
21 |
-
location /code/ {
|
22 |
-
# Serve GRADIO 8080
|
23 |
-
proxy_pass http://localhost:8080;
|
24 |
-
proxy_http_version 1.1;
|
25 |
-
proxy_set_header Upgrade $http_upgrade;
|
26 |
-
proxy_set_header Connection 'upgrade';
|
27 |
-
proxy_set_header Host $host;
|
28 |
-
proxy_set_header X-Real-IP $remote_addr;
|
29 |
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
30 |
-
proxy_cache_bypass $http_upgrade;
|
31 |
-
proxy_read_timeout 86400;
|
32 |
-
proxy_redirect off;
|
33 |
-
}
|
34 |
-
|
35 |
-
location /one/ {
|
36 |
-
client_max_body_size 64m;
|
37 |
-
proxy_http_version 1.1;
|
38 |
-
proxy_pass http://localhost:3000; # Modify your port accordingly
|
39 |
-
proxy_set_header Host $host;
|
40 |
-
proxy_set_header X-Forwarded-For $remote_addr;
|
41 |
-
proxy_cache_bypass $http_upgrade;
|
42 |
-
proxy_set_header Accept-Encoding gzip;
|
43 |
-
}
|
44 |
-
|
45 |
-
location /poe/ {
|
46 |
-
client_max_body_size 64m;
|
47 |
-
proxy_http_version 1.1;
|
48 |
-
proxy_pass http://localhost:3700; # Modify your port accordingly
|
49 |
-
proxy_set_header Host $host;
|
50 |
-
proxy_set_header X-Forwarded-For $remote_addr;
|
51 |
-
proxy_cache_bypass $http_upgrade;
|
52 |
-
proxy_set_header Accept-Encoding gzip;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
packages.txt
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
tree
|
2 |
neofetch
|
3 |
neovim
|
4 |
-
nginx
|
5 |
autossh
|
6 |
tmux
|
7 |
ripgrep
|
|
|
1 |
tree
|
2 |
neofetch
|
3 |
neovim
|
|
|
4 |
autossh
|
5 |
tmux
|
6 |
ripgrep
|
start_server.sh
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
#ssh -o StrictHostKeyChecking=no -R nya:80:localhost:7860 tunne.link -p8043 &
|
6 |
autossh -M 0 -o "StrictHostKeyChecking=no" -R nya:80:localhost:7860 tunne.link -p8043
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
echo "Start Caddy"
|
4 |
+
/usr/bin/caddy run --config /home/user/app/Caddyfile --adapter caddyfile
|
5 |
|
6 |
#ssh -o StrictHostKeyChecking=no -R nya:80:localhost:7860 tunne.link -p8043 &
|
7 |
autossh -M 0 -o "StrictHostKeyChecking=no" -R nya:80:localhost:7860 tunne.link -p8043
|