Loading nginx/docker-compose.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line # . services: nginx: image: nginx:latest ports: - "80:80" volumes: - ../nginx/nginx_static.conf:/etc/nginx/nginx.conf:ro - ../react-frontend/my-react-app/build:/usr/share/nginx/html:ro nginx/nginx.conf +10 −22 Original line number Diff line number Diff line Loading @@ -5,37 +5,25 @@ events { } http { # upstream react { # server react-frontend:3000; # } upstream react { server react-frontend:3000; } upstream tornado { server tornado-backend:8888; } server { listen 80; include /etc/nginx/mime.types; # after this serving of static .css works! (are included by default in nginx container) # Serve static frontend files root /usr/share/nginx/html; index index.html; # Proxy frontend location / { try_files $uri /index.html; proxy_pass http://react; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } # # Proxy frontend # location / { # proxy_pass http://react; # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection 'upgrade'; # proxy_set_header Host $host; # proxy_cache_bypass $http_upgrade; # } # Proxy API calls to backend location /tornado-backend/ { proxy_pass http://tornado; Loading nginx/nginx_static.conf 0 → 100644 +21 −0 Original line number Diff line number Diff line # nginx/nginx_static.conf events { } http { server { listen 80; include /etc/nginx/mime.types; # after this serving of static .css works! (are included by default in nginx container) # Serve static frontend files root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } } } Loading
nginx/docker-compose.yml 0 → 100644 +11 −0 Original line number Diff line number Diff line # . services: nginx: image: nginx:latest ports: - "80:80" volumes: - ../nginx/nginx_static.conf:/etc/nginx/nginx.conf:ro - ../react-frontend/my-react-app/build:/usr/share/nginx/html:ro
nginx/nginx.conf +10 −22 Original line number Diff line number Diff line Loading @@ -5,37 +5,25 @@ events { } http { # upstream react { # server react-frontend:3000; # } upstream react { server react-frontend:3000; } upstream tornado { server tornado-backend:8888; } server { listen 80; include /etc/nginx/mime.types; # after this serving of static .css works! (are included by default in nginx container) # Serve static frontend files root /usr/share/nginx/html; index index.html; # Proxy frontend location / { try_files $uri /index.html; proxy_pass http://react; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } # # Proxy frontend # location / { # proxy_pass http://react; # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection 'upgrade'; # proxy_set_header Host $host; # proxy_cache_bypass $http_upgrade; # } # Proxy API calls to backend location /tornado-backend/ { proxy_pass http://tornado; Loading
nginx/nginx_static.conf 0 → 100644 +21 −0 Original line number Diff line number Diff line # nginx/nginx_static.conf events { } http { server { listen 80; include /etc/nginx/mime.types; # after this serving of static .css works! (are included by default in nginx container) # Serve static frontend files root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } } }