Skip to content

Commit ec84c24

Browse files
committed
Add docker deployment with lb
1 parent 82f118a commit ec84c24

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
nginx:
3+
image: nginx:latest
4+
depends_on:
5+
- shiny_app
6+
ports:
7+
- "8080:80"
8+
volumes:
9+
- ./files/nginx.conf:/etc/nginx/nginx.conf:ro
10+
shiny_app:
11+
# container_name: shiny_app
12+
image: ghcr.io/eoda-dev/shiny-meets-fastapi:latest
13+
restart: always
14+
deploy:
15+
replicas: 2
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
events { }
2+
3+
http {
4+
map $http_upgrade $connection_upgrade {
5+
default upgrade;
6+
'' close;
7+
}
8+
9+
upstream shiny_app {
10+
server shiny_app:3333;
11+
}
12+
13+
server {
14+
listen 80;
15+
client_max_body_size 20M;
16+
17+
location / {
18+
proxy_pass http://shiny_app;
19+
proxy_set_header Host $host;
20+
proxy_set_header X-Real-IP $remote_addr;
21+
proxy_http_version 1.1;
22+
proxy_set_header Upgrade $http_upgrade;
23+
proxy_set_header Connection $connection_upgrade;
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)