Skip to content

Commit

Permalink
opt: 暴露443/8888端口,调整http配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
finovy committed Oct 12, 2023
1 parent 9cf2319 commit 25646f8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
3 changes: 2 additions & 1 deletion src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN cd /opt \
&& pip3 install -r /opt/archery/requirements.txt \
&& pip3 install "redis>=4.1.0" \
&& cp -f /opt/archery/src/docker/nginx.conf /etc/nginx/ \
&& cp -f /opt/archery/src/docker/http.conf /etc/nginx/conf.d/ \
&& cp -f /opt/archery/src/docker/supervisord.conf /etc/ \
&& mv /opt/sqladvisor /opt/archery/src/plugins/ \
&& mv /opt/soar /opt/archery/src/plugins/ \
Expand All @@ -21,7 +22,7 @@ RUN cd /opt \
&& rm -rf ~/.cache

#port
EXPOSE 9123
EXPOSE 443 9123 8888

#start service
ENTRYPOINT bash /opt/archery/src/docker/startup.sh && bash
Expand Down
27 changes: 27 additions & 0 deletions src/docker/http.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server{
listen 9123; #监听的端口
server_name archery;
client_max_body_size 20M;
proxy_read_timeout 600s;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /static {
alias /opt/archery/static;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
28 changes: 0 additions & 28 deletions src/docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,6 @@ http {
# for more information.
include /etc/nginx/conf.d/*.conf;

server{
listen 9123; #监听的端口
server_name archery;
client_max_body_size 20M;
proxy_read_timeout 600s;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host:nginx_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /static {
alias /opt/archery/static;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

# Settings for a TLS enabled server.
#
# server {
Expand Down

0 comments on commit 25646f8

Please sign in to comment.