-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
69 lines (64 loc) · 1.68 KB
/
Copy pathdocker-compose.local.yml
File metadata and controls
69 lines (64 loc) · 1.68 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
68
69
# Local full stack (Mongo + Redis + API). For cloud DB/Redis, use server/.env only and skip this file.
# Usage: docker compose -f docker-compose.local.yml --env-file server/.env up -d
services:
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --save "" --appendonly no
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
mongo:
image: mongo:7
restart: unless-stopped
volumes:
- mongo_data:/data/db
environment:
MONGO_INITDB_DATABASE: vcr-protocol
command: ["mongod", "--wiredTigerCacheSizeGB", "0.25"]
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 15s
timeout: 5s
retries: 8
start_period: 40s
api:
image: vcr-protocol-api
build:
context: ./server
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "3001:3001"
environment:
NODE_ENV: production
PORT: 3001
MONGODB_URI: mongodb://mongo:27017/vcr-protocol
REDIS_URL: redis://redis:6379
env_file:
- ./server/.env
register-worker:
image: vcr-protocol-api
build:
context: ./server
dockerfile: Dockerfile
restart: unless-stopped
command: ["node", "dist/workers/registerAgentWorker.js"]
depends_on:
api:
condition: service_healthy
environment:
NODE_ENV: production
MONGODB_URI: mongodb://mongo:27017/vcr-protocol
REDIS_URL: redis://redis:6379
env_file:
- ./server/.env
volumes:
mongo_data: