-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (64 loc) · 1.97 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: '3.8'
services:
stock_db:
build: stock_db
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uvicorn main:app --host 0.0.0.0'
ports:
- 8008:8000
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REST_API_USER=${REST_API_USER}
- REST_API_PASSWORD_HASHED=${REST_API_PASSWORD_HASHED}
- SECRET_KEY_JWT=${SECRET_KEY_JWT}
depends_on:
- db
db:
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
expose:
- 5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
valuation_app_sp500:
build: valuation
command: >
bash -c "while !</dev/tcp/stock_db/8000; do sleep 1; done;
python3 main.py --indexName SP500 --addToDatabase True --scheduled True"
environment:
- STOCK_DB_URL=stock_db
- STOCK_DB_PORT=8000
- REST_API_USER=${REST_API_USER}
- REST_API_PASSWORD=${REST_API_PASSWORD}
depends_on:
- stock_db
valuation_app_dax:
build: valuation
command: >
bash -c "while !</dev/tcp/stock_db/8000; do sleep 1; done;
python3 main.py --indexName DAX --addToDatabase True --scheduled True"
environment:
- STOCK_DB_URL=stock_db
- STOCK_DB_PORT=8000
- REST_API_USER=${REST_API_USER}
- REST_API_PASSWORD=${REST_API_PASSWORD}
depends_on:
- stock_db
cherry-picker:
build: cherry_picker
command: >
bash -c "while !</dev/tcp/stock_db/8000; do sleep 1; done;
python3 main.py --sendToDiscord True --scheduled True --verbose True"
environment:
- STOCK_DB_URL=stock_db
- STOCK_DB_PORT=8000
- REST_API_USER=${REST_API_USER}
- REST_API_PASSWORD=${REST_API_PASSWORD}
- SP500_WEBHOOK=${SP500_WEBHOOK}
- DAX_WEBHOOK=${DAX_WEBHOOK}
depends_on:
- stock_db
volumes:
postgres_data: