-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
76 lines (74 loc) · 2.09 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
services:
medispeak_db:
image: 'postgres:${POSTGRES_IMAGE_TAG:?}'
container_name: medispeak_db
volumes:
- medispeak_data:/var/lib/postgresql/data:rw
command: postgres -c 'max_connections=500'
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:${DB_PORT}"
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 10s
retries: 5
medispeak_backend:
build:
context: .
dockerfile: Dockerfile
args:
RAILS_ENV: ${RAILS_ENV}
BUNDLE_DEPLOYMENT: ${BUNDLE_DEPLOYMENT}
BUNDLE_PATH: ${BUNDLE_PATH}
BUNDLE_WITHOUT: ${BUNDLE_WITHOUT}
container_name: medispeak_backend
command: "bundle exec rails s -p ${BACKEND_PORT} -b '0.0.0.0'"
environment:
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
OPENAI_ACCESS_TOKEN: ${OPENAI_ACCESS_TOKEN}
OPENAI_ORGANIZATION_ID: ${OPENAI_ORGANIZATION_ID}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_REGION: ${AWS_REGION}
AWS_BUCKET: ${AWS_BUCKET}
PLUGIN_BASE_URL: ${PLUGIN_BASE_URL}
MINIO_BUCKET: ${MINIO_BUCKET}
MINIO_ACCESS_KEY_ID: ${MINIO_ACCESS_KEY_ID}
MINIO_SECRET_ACCESS_KEY: ${MINIO_SECRET_ACCESS_KEY}
MINIO_ENDPOINT: ${MINIO_ENDPOINT}
MINIO_REGION: ${MINIO_REGION}
STORAGE_SERVICE: ${STORAGE_SERVICE}
volumes:
- .:/app:cached
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
depends_on:
medispeak_db:
condition: service_healthy
restart: unless-stopped
minio:
profiles:
- "minio"
image: bitnami/minio
ports:
- '9000:9000'
- '9001:9001'
volumes:
- 'minio:/bitnami/minio/data'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_DEFAULT_BUCKETS=application
volumes:
medispeak_data:
driver: local
minio:
driver: local