Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (87 loc) · 2.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (87 loc) · 2.12 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
services:
redis:
image: redis:7-alpine
container_name: redis
restart: always
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
volumes:
- redis-data:/data
networks:
- mastra-network
postgres:
image: ankane/pgvector:latest
container_name: postgres
restart: always
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '1.0'
memory: 1G
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- mastra-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
mastra-app:
build:
context: .
dockerfile: Dockerfile
container_name: mastra-app
restart: unless-stopped
user: "1000:1000"
environment:
NODE_ENV: production
NODE_PORT: 5000
MASTRA_TELEMETRY_DISABLED: "true"
POSTHOG_DISABLED: "true"
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
POSTGRES_VECTOR_CONNECTION_STRING: ${POSTGRES_VECTOR_CONNECTION_STRING}
GROQ_API_KEY: ${GROQ_API_KEY}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
DEEPINFRA_API_KEY: ${DEEPINFRA_API_KEY}
ZHIPU_API_KEY: ${ZHIPU_API_KEY}
RECRUITER_NAME: oCode Recruiter
RECRUITMENT_MAIL: hi@ocode.co
CONSULTING_MAIL: consulting@ocode.co
BCC_MAIL: career@browsewire.net
env_file:
- .env
volumes:
- ./logs:/app/logs
- ./.env:/app/.env:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- mastra-network
volumes:
redis-data:
driver: local
postgres-data:
driver: local
networks:
mastra-network:
driver: bridge