macrdel commited on
Commit
e2898af
1 Parent(s): be5081d

update workflow

Browse files
Files changed (3) hide show
  1. .github/workflows/main.yml +3 -3
  2. Dockerfile +1 -1
  3. 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
- - 8001:8000
36
- - 8002:8000
37
  - 9090:9090
38
  - 3000:3000
39
- - 8080:8080
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 apt-get update && apt-get install -y nginx && apt-get clean && pip install --no-cache-dir --upgrade -r requirements.txt
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 --reload --host 0.0.0.0 --port 8000
7
- container_name: "app"
8
  ports:
9
- - 8001:8000
10
  volumes:
11
  - .:/home/user/app
12
  environment:
@@ -14,29 +14,29 @@ services:
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
 
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