-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
92 lines (86 loc) · 2.12 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
92
services:
frontend:
build:
context: ./
dockerfile: ./docker/Dockerfile.frontend
target: ${FRONTEND_BUILD_TARGET:-final}
ports:
- "${FRONTEND_PORT}:8080"
volumes:
- ./examples:/app/src/assets/examples
- ./frontend/src:/app/src
depends_on:
jsonrpc:
condition: service_healthy
expose:
- "${FRONTEND_PORT}"
jsonrpc:
build:
context: ./
dockerfile: ./docker/Dockerfile.backend
target: debug
environment:
- FLASK_SERVER_PORT=${RPCPORT}
# TODO: remove this in production
- PYTHONUNBUFFERED=1
- RPCDEBUGPORT=${RPCDEBUGPORT}
ports:
- "${RPCPORT}:${RPCPORT}"
- "${RPCDEBUGPORT}:${RPCDEBUGPORT}"
volumes:
- ./.env:/app/.env
- ./backend:/app/backend
depends_on:
ollama:
condition: service_started
database-migration:
condition: service_completed_successfully
expose:
- "${RPCPORT}"
webrequest:
build:
context: ./
dockerfile: ./docker/Dockerfile.webrequest
shm_size: 2gb
volumes:
- ./webrequest:/app/webrequest
environment:
- FLASK_SERVER_PORT=${WEBREQUESTPORT}
# TODO: remove this in production
- PYTHONUNBUFFERED=1
expose:
- "${WEBREQUESTPORT}"
ollama:
image: ollama/ollama:0.3.11
ports:
- 11434:11434
volumes:
- ./.ollama:/root/.ollama
container_name: ollama
tty: true
restart: always
postgres:
image: postgres:16-alpine
ports:
- "${DBPORT}:5432"
environment:
- POSTGRES_USER=${DBUSER}
- POSTGRES_PASSWORD=${DBPASSWORD}
- POSTGRES_DB=${DBNAME}
healthcheck:
test: pg_isready -U ${DBUSER} -d ${DBNAME}
interval: 10s
timeout: 3s
retries: 3
# If you want your db to persist in dev
# volumes:
# - "./data/postgres:/var/lib/postgresql/data"
database-migration:
build:
context: .
dockerfile: docker/Dockerfile.database-migration
environment:
- DB_URL=postgresql://${DBUSER}:${DBUSER}@postgres/${DBNAME}
depends_on:
postgres:
condition: service_healthy