Spaces:
Runtime error
Runtime error
macrdel
commited on
Commit
•
e2898af
1
Parent(s):
be5081d
update workflow
Browse files- .github/workflows/main.yml +3 -3
- Dockerfile +1 -1
- docker-compose.yml +25 -25
.github/workflows/main.yml
CHANGED
@@ -32,11 +32,11 @@ jobs:
|
|
32 |
image: docker:19.03.12
|
33 |
options: --privileged
|
34 |
ports:
|
35 |
-
-
|
36 |
-
|
37 |
- 9090:9090
|
38 |
- 3000:3000
|
39 |
-
|
40 |
steps:
|
41 |
- name: Checkout code
|
42 |
uses: actions/checkout@v2
|
|
|
32 |
image: docker:19.03.12
|
33 |
options: --privileged
|
34 |
ports:
|
35 |
+
- 8000:8000
|
36 |
+
#- 8002:8000
|
37 |
- 9090:9090
|
38 |
- 3000:3000
|
39 |
+
#- 8080:8080
|
40 |
steps:
|
41 |
- name: Checkout code
|
42 |
uses: actions/checkout@v2
|
Dockerfile
CHANGED
@@ -4,7 +4,7 @@ WORKDIR /code
|
|
4 |
|
5 |
COPY requirements.txt .
|
6 |
|
7 |
-
RUN
|
8 |
|
9 |
RUN useradd -m -u 1000 user
|
10 |
USER user
|
|
|
4 |
|
5 |
COPY requirements.txt .
|
6 |
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
8 |
|
9 |
RUN useradd -m -u 1000 user
|
10 |
USER user
|
docker-compose.yml
CHANGED
@@ -3,10 +3,10 @@ version: '3.7'
|
|
3 |
services:
|
4 |
app:
|
5 |
build: .
|
6 |
-
command: uvicorn app.api:app --
|
7 |
-
container_name: "
|
8 |
ports:
|
9 |
-
-
|
10 |
volumes:
|
11 |
- .:/home/user/app
|
12 |
environment:
|
@@ -14,29 +14,29 @@ services:
|
|
14 |
depends_on:
|
15 |
- prometheus
|
16 |
|
17 |
-
app2:
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
nginx:
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
prometheus:
|
42 |
image: prom/prometheus
|
|
|
3 |
services:
|
4 |
app:
|
5 |
build: .
|
6 |
+
command: uvicorn app.api:app --host 0.0.0.0 --port 8000 # --reload
|
7 |
+
container_name: "sentiment-summarize-youtube-comments"
|
8 |
ports:
|
9 |
+
- "8000:8000"
|
10 |
volumes:
|
11 |
- .:/home/user/app
|
12 |
environment:
|
|
|
14 |
depends_on:
|
15 |
- prometheus
|
16 |
|
17 |
+
# app2:
|
18 |
+
# build: .
|
19 |
+
# command: uvicorn app.api:app --reload --host 0.0.0.0 --port 8000
|
20 |
+
# container_name: "app2"
|
21 |
+
# ports:
|
22 |
+
# - 8002:8000
|
23 |
+
# volumes:
|
24 |
+
# - .:/home/user/app
|
25 |
+
# environment:
|
26 |
+
# - PYTHONPATH=/home/user/app
|
27 |
+
# depends_on:
|
28 |
+
# - prometheus
|
29 |
|
30 |
+
# nginx:
|
31 |
+
# image: nginx:latest
|
32 |
+
# container_name: "nginx"
|
33 |
+
# ports:
|
34 |
+
# - "8080:8080"
|
35 |
+
# volumes:
|
36 |
+
# - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
37 |
+
# depends_on:
|
38 |
+
# - app
|
39 |
+
# - app2
|
40 |
|
41 |
prometheus:
|
42 |
image: prom/prometheus
|