-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (56 loc) · 1.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (56 loc) · 1.51 KB
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
version: "3.8"
services:
api:
build: .
ports:
- "8000:8000"
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- MODULEMIRROR_API_KEY=${MODULEMIRROR_API_KEY:-}
- MODULEMIRROR_CORS_ORIGINS=${MODULEMIRROR_CORS_ORIGINS:-*}
- MODULEMIRROR_DB_PATH=/app/data/fingerprint_db.sqlite
- MODULEMIRROR_JWT_SECRET=${MODULEMIRROR_JWT_SECRET:-change-me-in-production}
- MODULEMIRROR_LOG_LEVEL=${MODULEMIRROR_LOG_LEVEL:-info}
volumes:
- mm-data:/app/data
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2.0"
memory: 1G
reservations:
cpus: "0.5"
memory: 256M
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
worker:
build: .
command: ["python", "-m", "gh_similarity_detector.cli.main", "db", "stats"]
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- MODULEMIRROR_DB_PATH=/app/data/fingerprint_db.sqlite
- MODULEMIRROR_JWT_SECRET=${MODULEMIRROR_JWT_SECRET:-change-me-in-production}
volumes:
- mm-data:/app/data
restart: "no"
depends_on:
api:
condition: service_healthy
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
volumes:
mm-data:
driver: local