-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
184 lines (173 loc) · 4.83 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
version: '3.4'
services:
ollama:
container_name: ollama
image: ollama/ollama # Replace with specific Ollama version if needed
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: ["gpu"]
count: all # Adjust count for the number of GPUs you want to use
volumes:
- ollama:/root/.ollama
restart: always
redis:
image: "redis:alpine"
ports:
- "6379:6379"
# file server
postgresql:
image: pgvector/pgvector:0.7.0-pg15
shm_size: 2g
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432" # Expose PostgreSQL default port
networks:
default:
aliases:
- postgresql
volumes:
- ./postgresql_data:/var/lib/postgresql/data # Persistent data volume
documentation:
build:
context: ./documentation
ports:
- "8004:3000"
webapp:
container_name: webapp
depends_on:
- postgresql
build:
context: ./webapp
args:
- NEXT_PUBLIC_SERVER_URL=${NEXT_PUBLIC_SERVER_URL}
- DATABASE_URL=${DATABASE_URL}
- OLLAMA_URL=${OLLAMA_URL}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- NEXTAUTH_URL=${NEXTAUTH_URL}
- NEXT_PUBLIC_S3_ACCESS_KEY=${S3_ACCESS_KEY}
- NEXT_PUBLIC_S3_SECRET_KEY=${S3_SECRET_KEY}
- NEXT_PUBLIC_S3_ENDPOINT=${S3_ENDPOINT}
- NEXT_PUBLIC_S3_REGION=${S3_REGION}
- NEXT_PUBLIC_S3_BUCKET=${S3_BUCKET}
- NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_REGION=${S3_REGION}
- S3_BUCKET=${S3_BUCKET}
- SCW_ACCESS_KEY=${SCW_ACCESS_KEY}
- SCW_SECRET_KEY=${SCW_SECRET_KEY}
- SCW_PROJECT_ID=${SCW_PROJECT_ID}
- SCW_REGION=${SCW_REGION}
- H5P_URL=${H5P_URL}
- MOODLE_NODE_SERVER_URL=${MOODLE_NODE_SERVER_URL}
- MOODLE_URL=${MOODLE_URL}
- MOODLE_TOKEN=${MOODLE_TOKEN}
ports:
- "8002:3000"
environment:
- NEXT_PUBLIC_S3_ACCESS_KEY=${S3_ACCESS_KEY}
- NEXT_PUBLIC_S3_SECRET_KEY=${S3_SECRET_KEY}
- NEXT_PUBLIC_S3_ENDPOINT=${S3_ENDPOINT}
- NEXT_PUBLIC_S3_REGION=${S3_REGION}
- NEXT_PUBLIC_S3_BUCKET=${S3_BUCKET}
- NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_REGION=${S3_REGION}
- S3_BUCKET=${S3_BUCKET}
- DATABASE_URL=${DATABASE_URL}
- OLLAMA_URL=${OLLAMA_URL}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- NEXTAUTH_URL=${NEXTAUTH_URL}
- H5P_URL=${H5P_URL}
- MOODLE_NODE_SERVER_URL=${MOODLE_NODE_SERVER_URL}
- MOODLE_URL=${MOODLE_URL}
- MOODLE_TOKEN=${MOODLE_TOKEN}
healthcheck:
test: ["CMD", "npx", "prisma", "db", "push"]
interval: 10s
timeout: 5s
retries: 5
server:
runtime: nvidia
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- YOUTUBE_API_KEY=${YOUTUBE_API_KEY}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_REGION=${S3_REGION}
- S3_BUCKET=${S3_BUCKET}
build:
context: ./server
ports:
- "8000:8000"
volumes:
- ./documents:/server/documents
- ./ftp-data:/server/ftp-data
h5p:
container_name: h5p
build:
context: ./h5p
ports:
- "8006:8080"
volumes:
- ./h5p:/app/h5p
- ./public:/app/public
mariadb:
image: docker.io/bitnami/mariadb:11.4
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_moodle
- MARIADB_DATABASE=bitnami_moodle
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- 'mariadb_data:/bitnami/mariadb'
moodle:
build: moodle
container_name: moodle
ports:
- '8008:8080'
- '8022:22'
- '8009:3000'
environment:
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=bn_moodle
- MOODLE_DATABASE_NAME=bitnami_moodle
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- 'moodle_data:/bitnami/moodle'
- 'moodledata_data:/bitnami/moodledata'
volumes:
mariadb_data:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/moodle/data/mariadb
moodle_data:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/moodle/data/moodle
moodledata_data:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/moodle/data/moodledata
ollama:
driver: local