-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathdocker-compose.prod.yaml
99 lines (88 loc) · 1.91 KB
/
docker-compose.prod.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3.4"
x-common-variables: &common-variables # General
APP_NAME: "backend"
ENVIRONMENT: "production"
ADMIN_PASSWORD: "***********"
# Server Config
WORKERS: 9
HOST: "0.0.0.0"
EXPOSE_PORT: 8000
FORWARDED_ALLOW_IPS: "*"
# Stock APIs
FINN_HUB_API_KEY: "***********"
ALPHA_VANTAGE_API_KEY: "***********"
OPEN_FIGI_API_KEY: "***********"
# Database APIs
MONGO_SERVER_URL: "database"
MONGO_BACKUP_URL: "1LT4xiFJkh6YlAPQDcov8YIKqcvevFlEE"
REDIS_SERVER_URL: "cache"
REDIS_PORT: 6379
MEILI_SERVER_URL: "search"
MEILI_MASTER_KEY: "***********"
# Telemetry
TELEMETRY: True
SENTRY_DSN: "***********"
services:
# FastAPI
backend:
container_name: backend
build:
dockerfile: Dockerfile
depends_on:
- database
- cache
- search
- worker
volumes:
- ./public:/app/public
networks:
- proxy-network
environment: *common-variables
restart: always
# Celery
worker:
container_name: worker
build:
context: ./
dockerfile: ./worker/Dockerfile
depends_on:
- cache
networks:
- proxy-network
environment: *common-variables
restart: always
# Redis
cache:
container_name: cache
build:
context: ./cache
dockerfile: Dockerfile
networks:
- proxy-network
restart: always
# MongoDB
database:
container_name: database
build:
context: ./database
dockerfile: Dockerfile
networks:
- proxy-network
volumes:
- ./database/main_db:/data/db
restart: always
# Meilisearch
search:
container_name: search
build:
context: ./search
dockerfile: Dockerfile.prod
volumes:
- ./search/search_db:/meili_data
networks:
- proxy-network
environment: *common-variables # Only MEILI_SERVER_URL and MEILI_MASTER_KEY are needed.
restart: always
networks:
proxy-network:
name: proxy-network