Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.54 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
60
61
62
63
64
65
66
67
services:
mongodb:
container_name: mongo
image: mongo:latest
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
volumes:
- /data/db:/data/db
- ./config/mongod.conf:/etc/mongod.conf
command:
- "--bind_ip_all"
deploy:
resources:
limits:
memory: 400M
reservations:
memory: 200M
redis:
container_name: redis
image: redis:alpine
ports:
- 6379:6379
restart: always
volumes:
- ./config/redis.conf:/etc/redis/redis.conf
command: redis-server /etc/redis/redis.conf
deploy:
resources:
limits:
memory: 300M
reservations:
memory: 200M
mcim-rust-api:
container_name: mcim-rust-api
image: z0z0r4/mcim-rust-api:latest
ports:
- 8080:8080
restart: always
depends_on:
- mongodb
- redis
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "--show-error", "http://127.0.0.1:8080/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
environment:
PORT: 8080
MONGODB_URI: "mongodb://root:example@mongodb:27017"
REDIS_URL: "redis://redis:6379"
CURSEFORGE_API_URL: "https://api.curseforge.com"
MODRINTH_API_URL: "https://api.modrinth.com"
CURSEFORGE_API_KEY: "your_curseforge_api_key"
deploy:
resources:
limits:
memory: 500M
reservations:
memory: 300M