forked from cohere-ai/cohere-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (88 loc) · 2.1 KB
/
docker-compose.yml
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
version: '3.8'
services:
db:
image: postgres:14.11-alpine
restart: always
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 5s
retries: 5
environment:
- PGUSER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=toolkit
ports:
- '5432:5432'
volumes:
- db:/var/lib/postgresql/data
test_db:
image: postgres:14.1-alpine
restart: unless-stopped
environment:
- PGUSER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=test_toolkit
ports:
- '5433:5432'
backend:
build:
context: .
dockerfile: ./src/backend/Dockerfile
develop:
watch:
- action: sync
path: ./src/backend
target: /workspace/src/backend
ignore:
- __pycache__/
- alembic/
- data/
- action: sync
path: ./src/community
target: /workspace/src/community
ignore:
- __pycache__/
- alembic/
- data/
stdin_open: true
tty: true
ports:
- '8000:8000'
depends_on:
- db
volumes:
# Mount alembic folder to sync migrations
- ./src/backend/alembic:/workspace/src/backend/alembic
# Mount data folder to sync uploaded files
- ./src/backend/data:/workspace/src/backend/data
# For SageMaker: The line below for AWS configure file to sync credentials
- $HOME/.aws:/root/.aws
# network_mode: host
frontend:
build:
context: ./src/interfaces/coral_web
dockerfile: Dockerfile
# Set environment variables directly in the docker-compose file
environment:
NEXT_PUBLIC_API_HOSTNAME: ${NEXT_PUBLIC_API_HOSTNAME}
restart: always
ports:
- 4000:4000
develop:
watch:
- action: sync
path: ./src/interfaces/coral_web
target: /app
ignore:
- node_modules/
terrarium:
image: ghcr.io/cohere-ai/terrarium:latest
ports:
- '8080:8080'
expose:
- '8080'
volumes:
db:
name: cohere_toolkit_db
driver: local