forked from neonwatty/meme-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (50 loc) · 1.32 KB
/
docker-compose.yaml
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
version: "3.8"
services:
rails_app:
build:
context: ./rails_app
dockerfile: Dockerfile
container_name: meme_search_rails_app
environment:
- DATABASE_URL=postgres://postgres:postgres@meme-search-db:5432/meme_search_production
ports:
- "3000:3000"
depends_on:
meme-search-db:
condition: service_healthy
volumes:
- ./memes/:/rails/public/memes
image_to_text_app:
build:
context: ./image_to_text_app
dockerfile: Dockerfile
ports:
- 8000:8000
volumes:
- ./memes/:/app/public/memes
container_name: meme_search_image_to_text_app
deploy:
resources:
limits: # <-- roughly tested min memory for cpu usage
memory: 12GB
# reservations: # <-- uncomment for gpu usage
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
meme-search-db:
image: pgvector/pgvector:pg17
container_name: meme-search-db
volumes:
- ./data/meme-search-db:/var/lib/postgresql/data
environment:
POSTGRES_DB: meme_search_production
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5