File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,15 @@ services:
3232 env_file :
3333 - ./deploy/env/backend.env
3434 ports :
35- - " 127.0.0.1: 8081:8081"
35+ - " 8081:8081"
3636 volumes :
3737 - uploads_data:/app/uploads
3838
3939 frontend :
4040 image : ${REGISTRY:-docker.io}/${IMAGE_NAMESPACE:-hungnq315}/smalltrend-frontend:${IMAGE_TAG:-latest}
4141 restart : unless-stopped
4242 ports :
43- - " 127.0.0.1: 3000:80"
43+ - " 3000:80"
4444
4545volumes :
4646 mysql_data :
Original file line number Diff line number Diff line change @@ -8,4 +8,12 @@ server {
88 location / {
99 try_files $uri $uri/ /index.html;
1010 }
11+
12+ location /api/ {
13+ proxy_pass http://backend:8081/api/;
14+ proxy_set_header Host $host;
15+ proxy_set_header X-Real-IP $remote_addr;
16+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17+ proxy_set_header X-Forwarded-Proto $scheme;
18+ }
1119}
You can’t perform that action at this time.
0 commit comments