Add nginx so we can make requests to our from the FE without CORS issues (#3)
Co-authored-by: David Frymoyer <david.frymoyer@gmail.com> Reviewed-on: #3 Co-authored-by: fry <david.frymoyer@gmail.com> Co-committed-by: fry <david.frymoyer@gmail.com>
This commit is contained in:
parent
a17107379c
commit
74ee26c8d6
@ -6,4 +6,8 @@ services:
|
||||
api:
|
||||
build: .
|
||||
ports:
|
||||
- 1379:1379
|
||||
- 1379:1379
|
||||
web:
|
||||
build: nginx
|
||||
ports:
|
||||
- 80:80
|
3
nginx/Dockerfile
Normal file
3
nginx/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginx:latest AS base
|
||||
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
17
nginx/nginx.conf
Normal file
17
nginx/nginx.conf
Normal file
@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name steve;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://ui:3000;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
rewrite ^/api(/.*)$ $1 break;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://api:1379;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user