Skip to content

Commit

Permalink
Add Nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Nov 11, 2023
1 parent 3f6b890 commit 80d597c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ services:
- ai-server
ports:
- "8080:8080"
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- web-server
- ai-server
28 changes: 28 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
worker_processes auto;

events {
worker_connections 1024;
}

http {
server {
listen 80;
server_name desdemona.seoulsky.org;

location / {
proxy_pass http://web-server:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /api {
proxy_pass http://ai-server:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}

0 comments on commit 80d597c

Please sign in to comment.