Spaces:
Runtime error
Runtime error
macrdel
commited on
Commit
•
898bea3
1
Parent(s):
5071ae8
update workflow
Browse files- Dockerfile +1 -1
- docker-compose.yml +19 -5
- nginx/nginx.conf +2 -0
Dockerfile
CHANGED
@@ -15,4 +15,4 @@ WORKDIR $HOME/app
|
|
15 |
|
16 |
COPY --chown=user . $HOME/app
|
17 |
|
18 |
-
CMD ["sh", "-c", "service nginx start && uvicorn app.
|
|
|
15 |
|
16 |
COPY --chown=user . $HOME/app
|
17 |
|
18 |
+
CMD ["sh", "-c", "service nginx start && uvicorn app.api:app --host 0.0.0.0 --port 8000"]
|
docker-compose.yml
CHANGED
@@ -2,10 +2,24 @@ version: '3.7'
|
|
2 |
|
3 |
services:
|
4 |
app:
|
5 |
-
build:
|
6 |
-
container_name: sentiment-summarize-youtube-comments
|
7 |
ports:
|
8 |
-
- "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
depends_on:
|
10 |
- prometheus
|
11 |
networks:
|
@@ -15,9 +29,9 @@ services:
|
|
15 |
image: nginx:latest
|
16 |
container_name: nginx
|
17 |
ports:
|
18 |
-
- "
|
19 |
volumes:
|
20 |
-
- ./nginx/nginx.conf:/etc/nginx/
|
21 |
depends_on:
|
22 |
- app
|
23 |
networks:
|
|
|
2 |
|
3 |
services:
|
4 |
app:
|
5 |
+
build: app
|
6 |
+
container_name: sentiment-summarize-youtube-comments-1
|
7 |
ports:
|
8 |
+
- "8001:8000"
|
9 |
+
volumes:
|
10 |
+
- .app:/home/user/app
|
11 |
+
depends_on:
|
12 |
+
- prometheus
|
13 |
+
networks:
|
14 |
+
- custom
|
15 |
+
|
16 |
+
app2:
|
17 |
+
build: app
|
18 |
+
container_name: sentiment-summarize-youtube-comments-2
|
19 |
+
ports:
|
20 |
+
- "8002:8000"
|
21 |
+
volumes:
|
22 |
+
- .app:/home/user/app
|
23 |
depends_on:
|
24 |
- prometheus
|
25 |
networks:
|
|
|
29 |
image: nginx:latest
|
30 |
container_name: nginx
|
31 |
ports:
|
32 |
+
- "8000:80"
|
33 |
volumes:
|
34 |
+
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
35 |
depends_on:
|
36 |
- app
|
37 |
networks:
|
nginx/nginx.conf
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
upstream backend {
|
2 |
server app:8000;
|
|
|
3 |
}
|
4 |
|
5 |
server {
|
6 |
listen 80;
|
|
|
7 |
|
8 |
location / {
|
9 |
proxy_pass http://backend;
|
|
|
1 |
upstream backend {
|
2 |
server app:8000;
|
3 |
+
server app2:8000;
|
4 |
}
|
5 |
|
6 |
server {
|
7 |
listen 80;
|
8 |
+
server_name _;
|
9 |
|
10 |
location / {
|
11 |
proxy_pass http://backend;
|