-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
55 lines (53 loc) · 1.25 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
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- MODE=dev
volumes:
- .:/app
env_file:
- .env
ports:
- '8000:8000'
depends_on:
- postgres
- minio
command: >
sh -c '
./wait-for-it.sh postgres:5432 -t 60 --
alembic upgrade head &&
if [ "$MODE" = "dev" ]; then
python -m chainlit run app.py --port 8000 --watch --host 0.0.0.0
else
python -m chainlit run app.py --port 8000 --host 0.0.0.0
fi
'
postgres:
image: postgres:16.1
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_VOLUME_PATH=${POSTGRES_VOLUME_PATH}
ports:
- '5432:5432'
volumes:
- ${POSTGRES_VOLUME_PATH}:/var/lib/postgresql/data
minio:
image: minio/minio
env_file:
- .env
environment:
- MINIO_VOLUME_PATH=${MINIO_VOLUME_PATH}
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
command: server /data --console-address ":9001"
ports:
- '9000:9000'
- '9001:9001'
volumes:
- ${MINIO_VOLUME_PATH}:/data