-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (134 loc) · 4.46 KB
/
docker-compose.yml
File metadata and controls
141 lines (134 loc) · 4.46 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
postgres:
image: pgvector/pgvector:pg15
container_name: lodestone_postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-lodestone}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-lodestone}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-pgvector.sql:/docker-entrypoint-initdb.d/init-pgvector.sql
ports:
- "5432:5432"
networks:
- lodestone_network
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lodestone} -d ${POSTGRES_DB:-lodestone}"]
# interval: 10s
# timeout: 5s
# retries: 5
redis:
image: redis:7-alpine
container_name: lodestone_redis
ports:
- "6379:6379"
networks:
- lodestone_network
# healthcheck:
# test: ["CMD", "redis-cli", "ping"]
# interval: 10s
# timeout: 3s
# retries: 5
minio:
image: minio/minio:latest
container_name: lodestone_minio
command: server /data --console-address ":9001"
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
networks:
- lodestone_network
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
# interval: 30s
# timeout: 20s
# retries: 3
api:
build: .
container_name: lodestone_api
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://lodestone:password@postgres:5432/lodestone}
DATABASE_URL_SYNC: ${DATABASE_URL_SYNC:-postgresql://lodestone:password@postgres:5432/lodestone}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
MINIO_ENDPOINT: ${MINIO_ENDPOINT:-minio:9000}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
SECRET_KEY: ${SECRET_KEY:-your-super-secret-jwt-key-change-in-production}
# Disable tokenizers parallelism to avoid warnings
TOKENIZERS_PARALLELISM: false
# Python settings for better container performance
PYTHONUNBUFFERED: 1
PYTHONDONTWRITEBYTECODE: 1
ports:
- "8000:8000"
depends_on:
- postgres
- redis
- minio
networks:
- lodestone_network
volumes:
- .:/app
restart: unless-stopped
# celery_worker:
# build: .
# container_name: lodestone_celery_worker
# command: ["uv", "run", "celery", "-A", "app.workers.celery_app", "worker", "--loglevel=info", "--concurrency=2"]
# environment:
# DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://lodestone:password@postgres:5432/lodestone}
# DATABASE_URL_SYNC: ${DATABASE_URL_SYNC:-postgresql://lodestone:password@postgres:5432/lodestone}
# REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
# CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379/0}
# CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379/0}
# MINIO_ENDPOINT: ${MINIO_ENDPOINT:-minio:9000}
# MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
# MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
# # Disable tokenizers parallelism to avoid warnings in containers
# TOKENIZERS_PARALLELISM: false
# # Python settings for better container performance
# PYTHONUNBUFFERED: 1
# PYTHONDONTWRITEBYTECODE: 1
# depends_on:
# - postgres
# - redis
# - minio
# networks:
# - lodestone_network
# volumes:
# - .:/app
# restart: unless-stopped
# Uncomment the following section to enable Ollama integration
# Ollama in container is underpowered for serious use, it's recommended to run Ollama natively on the host machine
# ollama:
# image: ollama/ollama:latest
# container_name: lodestone_ollama
# ports:
# - "11434:11434"
# volumes:
# - ollama_data:/root/.ollama
# environment:
# - OLLAMA_MODELS=/root/.ollama/models
# networks:
# - lodestone_network
# # Uncomment if you have GPU support
# # deploy:
# # resources:
# # reservations:
# # devices:
# # - driver: nvidia
# # count: 1
# # capabilities: [gpu]
volumes:
postgres_data:
minio_data:
networks:
lodestone_network:
driver: bridge