-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (41 loc) · 946 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
version: "3"
services:
scrapper:
build: scrapper
container_name: TheguardianScrapper
restart: unless-stopped
env_file: .env
environment:
- DB_URL=${DB_URL}
- DB_NAME=${DB_NAME}
api:
build: rest-api
container_name: api
restart: unless-stopped
env_file: .env
environment:
- DB_URL=${DB_URL}
- DB_NAME=${DB_NAME}
# expose fastapi port only inside docker network and not machine network layer, will be intercepted by nginx
expose:
- 8080
networks:
- api_network
nginx:
build: ./nginx
container_name: fastapi-nginx
volumes:
- logs:/home/app/fast-api-proxy/logs/
# bind nginx port (81) from container to machine port 8080, which will intercept calls on port 8080
ports:
- 8080:81
depends_on:
- api
networks:
- api_network
networks:
api_network:
driver: bridge
volumes:
logs: