-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (127 loc) · 3.34 KB
/
docker-compose.yml
File metadata and controls
135 lines (127 loc) · 3.34 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
name: "CoLIBRi"
# Service definition
services:
# PostgreSQL database container
database:
container_name: database
image: postgres:17
ports:
- "7211:5432"
restart: always
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=db_admin
- POSTGRES_PASSWORD=yYjMvUtEpJVYomQp?-Y4
- PGUSER=db_admin
volumes:
# persist data from internal path /var/lib/postgresql/data to named volume pgdb-data on disk
- pgdb-data:/var/lib/postgresql/data
# Bind local folder databse/initdb with initialization scripts to internal path docker-entrypoint-initdb.d
- ./database/initdb/:/docker-entrypoint-initdb.d
# Bind local folder database/resources to internal path where COPY can access it
- ./database/resources/example_data/:/var/lib/postgresql/resources/example_data
networks:
- app-net
# Spring application container
spring-app:
container_name: spring-app
build:
# Build container with provided Dockerfile
context: ./database
dockerfile: Dockerfile
ports:
- "7201:8080"
restart: always
depends_on:
- database
environment:
# Env variables will overwrite variables in Spring application.properties
- POSTGRES_HOST=database:5432
- POSTGRES_APP_DB=app_db
- POSTGRES_APP_USER=app_db_user
# A hash of the following password is used to initialize the database
# See file database/initdb/1_user_schema.sql
- POSTGRES_APP_PASSWORD=qS2OwNOCZeaVqoaW6lZC
networks:
- app-net
# Python application container with preprocessor
preprocessor-app:
container_name: preprocessor-app
build:
context: ./preprocessor
dockerfile: ${PP_DOCKER_FILE}
args:
PP_PORT: 6201
GPU_ID: 0
ports:
- "6201:6201"
restart: always
depends_on:
- spring-app
# NVIDIA GPU usage
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["0"]
capabilities: [gpu]
networks:
- app-net
# Service for LLM backend
convsearch-app:
container_name: convsearch-app
build:
# Build container with provided Dockerfile
context: ./conv-search
dockerfile: Dockerfile
args:
CS_PORT: 9201
ports:
- "9201:9201"
restart: always
depends_on:
- spring-app
env_file: ./conv-search/.env
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- DATABASE_HOST=spring-app:8080
networks:
- app-net
# Python application container with frontend
frontend-app:
container_name: frontend-app
build:
# Build container with provided Dockerfile
context: ./frontend
dockerfile: Dockerfile
args:
APP_PORT: 5201
ports:
- "5201:5201"
restart: always
depends_on:
- spring-app
- preprocessor-app
- convsearch-app
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- DATABASE_HOST=spring-app:8080
- PREPROCESSOR_HOST=preprocessor-app:6201
- CONVSEARCH_HOST=convsearch-app:9201
- PATHNAME_PREFIX=${FRONTEND_PATH}
networks:
- app-net
# Networks
networks:
app-net:
ipam:
driver: default
config:
- subnet: 192.168.208.0/20
gateway: 192.168.208.1
# Named volumes
volumes:
pgdb-data: {}