diff --git a/linedance-api/docker-compose.yml b/linedance-api/docker-compose.yml index 367c12b5..f8aeb83d 100644 --- a/linedance-api/docker-compose.yml +++ b/linedance-api/docker-compose.yml @@ -14,7 +14,7 @@ services: build: ./web restart: always ports: - - "8001:8001" + - "80:80" networks: - linedance depends_on: @@ -31,4 +31,3 @@ services: networks: linedance: name: linedance - diff --git a/linedance-api/web/nginx.conf b/linedance-api/web/nginx.conf index a7a3dce2..55c97252 100644 --- a/linedance-api/web/nginx.conf +++ b/linedance-api/web/nginx.conf @@ -4,6 +4,12 @@ server { root /usr/share/nginx/html; index index.html; + location /api/ { + proxy_pass http://api:8000/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } + location / { try_files $uri $uri/ /index.html; } diff --git a/linedance-api/web/public/index.html b/linedance-api/web/public/index.html index 2aedffcc..1b2d00fb 100644 --- a/linedance-api/web/public/index.html +++ b/linedance-api/web/public/index.html @@ -386,7 +386,7 @@