File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed
Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ nginx :
4+ platform : linux/amd64
5+ image : nginx:1.23.2-alpine
6+ ports :
7+ - 80:80
8+ - 443:443
9+ volumes :
10+ - ./infra/nginx/local/conf/:/etc/nginx/conf.d/:ro
11+
12+ frontend :
13+ build :
14+ context : ./client/
15+ dockerfile : Dockerfile
16+
17+ backend :
18+ build :
19+ context : ./server/
20+ dockerfile : Dockerfile
21+ ports :
22+ - 8000:8000
Original file line number Diff line number Diff line change 1+ upstream frontend {
2+ server frontend:80;
3+ }
4+
5+ upstream backend {
6+ server backend:8000;
7+ }
8+
9+ server {
10+ listen 80;
11+ server_name _;
12+ server_tokens off;
13+
14+ location / {
15+ proxy_set_header X-Real-IP $remote_addr;
16+ proxy_set_header X-Real-Port $remote_port;
17+ proxy_set_header Host $http_host;
18+ proxy_connect_timeout 3000;
19+ proxy_send_timeout 3000;
20+ proxy_read_timeout 3000;
21+ proxy_pass http://frontend;
22+ }
23+
24+ location /api {
25+ proxy_set_header X-Real-IP $remote_addr;
26+ proxy_set_header X-Real-Port $remote_port;
27+ proxy_set_header Host $http_host;
28+ proxy_connect_timeout 3000;
29+ proxy_send_timeout 3000;
30+ proxy_read_timeout 3000;
31+ proxy_pass http://backend;
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments