first commit

main
3wish 2024-04-11 17:28:42 +08:00
parent e1b2939cd7
commit c2c98fb440
2 changed files with 51 additions and 0 deletions

View File

@ -1,2 +1,4 @@
FROM nginx FROM nginx
EXPOSE 80 EXPOSE 80
COPY ./nginx.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]

View File

@ -0,0 +1,49 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://together-backend:8000;
}
location /static {
proxy_pass https://together-backend:8000;
}
}
}