File tree Expand file tree Collapse file tree 4 files changed +92
-1
lines changed Expand file tree Collapse file tree 4 files changed +92
-1
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,14 @@ services:
49
49
- " 3000:3000"
50
50
depends_on :
51
51
backend :
52
- condition : service_healthy
52
+ condition : service_healthy
53
+ nginx :
54
+ build : ./nginx
55
+ volumes :
56
+ - ./backend/static:/static
57
+ - ./nginx/:/etc/nginx/conf.d/:ro
58
+ - ./certbot/www/:/var/www/certbot/:ro
59
+ - ./certbot/www/:/etc/nginx/ssl/:ro
60
+ ports :
61
+ - " 80:80"
62
+ - " 443:443"
Original file line number Diff line number Diff line change
1
+ FROM nginx:1.21.6
2
+
3
+ COPY ./default.conf /etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
1
+ upstream django {
2
+ server llm_api:8001;
3
+ }
4
+
5
+ server {
6
+ listen 80;
7
+ server_name YOUR_IP_ADDRESS;
8
+ # server_name 10.300.60.200; - for example
9
+ keepalive_timeout 10000;
10
+ proxy_read_timeout 10000;
11
+ proxy_connect_timeout 10000;
12
+ proxy_send_timeout 10000;
13
+ client_max_body_size 100M;
14
+
15
+ location / {
16
+ proxy_pass http://django;
17
+ }
18
+
19
+ location /static/ {
20
+ alias /static/;
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ upstream django {
2
+ server backend:8000;
3
+ }
4
+
5
+ server {
6
+ listen 80;
7
+ listen [::]:80;
8
+
9
+ server_name svlpmygptbknd01.stjude.org www.svlpmygptbknd01.stjude.org;
10
+ server_tokens off;
11
+
12
+ # location / {
13
+ # proxy_pass http://django;
14
+ # }
15
+
16
+ location / {
17
+ proxy_pass http://backend;
18
+ return 301 http://svlpmygptbknd01.stjude.org$request_uri;
19
+ }
20
+
21
+ location /static/ {
22
+ alias /static/;
23
+ }
24
+
25
+ location /.well-known/acme-challenge/ {
26
+ root /var/www/certbot;
27
+ }
28
+ }
29
+
30
+ server {
31
+ listen 443 default_server ssl http2;
32
+ listen [::]:443 ssl http2;
33
+
34
+ ssl on;
35
+
36
+ server_name svlpmygptbknd01.stjude.org;
37
+
38
+ ssl_certificate /etc/nginx/ssl/svlpmygptbknd01.pem;
39
+ ssl_certificate_key /etc/nginx/ssl/svlpmygptbknd01.pem;
40
+
41
+ location / {
42
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
43
+ proxy_set_header X-Forwarded-Proto https;
44
+ proxy_set_header Host $http_host;
45
+ proxy_redirect off;
46
+
47
+ if (!-f $request_filename) {
48
+ proxy_pass http://backend;
49
+ break;
50
+ }
51
+ }
52
+
53
+ location /static/ {
54
+ alias /static/;
55
+ }
56
+ }
You can’t perform that action at this time.
0 commit comments