Spaces:
Sleeping
Sleeping
Create docker-compose.quantum.yml
Browse files- docker-compose.quantum.yml +41 -0
docker-compose.quantum.yml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# docker-compose.quantum.yml
|
| 2 |
+
version: '3.8'
|
| 3 |
+
services:
|
| 4 |
+
redis:
|
| 5 |
+
image: redis:7-alpine
|
| 6 |
+
ports: ["6379:6379"]
|
| 7 |
+
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
|
| 8 |
+
|
| 9 |
+
postgres:
|
| 10 |
+
image: postgres:15-alpine
|
| 11 |
+
environment:
|
| 12 |
+
POSTGRES_DB: mate
|
| 13 |
+
POSTGRES_USER: mate
|
| 14 |
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
| 15 |
+
volumes:
|
| 16 |
+
- pg-data:/var/lib/postgresql/data
|
| 17 |
+
|
| 18 |
+
celery-worker:
|
| 19 |
+
build: .
|
| 20 |
+
command: celery -A app.celery_quantum_executor.app worker --loglevel=info --concurrency=10
|
| 21 |
+
environment:
|
| 22 |
+
- DATABASE_URL=${POSTGRES_URL}
|
| 23 |
+
- REDIS_URL=${REDIS_URL}
|
| 24 |
+
|
| 25 |
+
api:
|
| 26 |
+
build: .
|
| 27 |
+
command: uvicorn app:app --host 0.0.0.0 --port 8000 --workers 4 --loop uvloop
|
| 28 |
+
ports: ["8000:8000"]
|
| 29 |
+
environment:
|
| 30 |
+
- DATABASE_URL=${POSTGRES_URL}
|
| 31 |
+
- REDIS_URL=${REDIS_URL}
|
| 32 |
+
- POLYGON_RPC_URL=${POLYGON_RPC_URL}
|
| 33 |
+
- PRIVATE_KEY=${PRIVATE_KEY}
|
| 34 |
+
|
| 35 |
+
prometheus:
|
| 36 |
+
image: prom/prometheus:latest
|
| 37 |
+
ports: ["9090:9090"]
|
| 38 |
+
|
| 39 |
+
grafana:
|
| 40 |
+
image: grafana/grafana:latest
|
| 41 |
+
ports: ["3001:3000"]
|