-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
122 lines (107 loc) · 4.05 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
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
version: '3.2'
x-server: &base-server-config
build: ./
environment: &base-environment
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-deep-nlp}
POSTGRES_HOSTNAME: ${POSTGRES_HOSTNAME:-db}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
REDIS_HOST: ${REDIS_HOST:-redis}
# Django
DEBUG: ${DEBUG:-false}
IS_MOCKSERVER: ${IS_MOCKSERVER:-}
ENVIRONMENT: ${ENVIRONMENT:-local}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:?Provide django secret key}
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost}
CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS:-http://localhost}
ENDPOINT_NAME: ${ENDPOINT_NAME:-http://localhost}
USE_S3: ${USE_S3:-}
USE_NEW_SUMMARIZATION: ${USE_NEW_SUMMARIZATION:-}
ECS_REQUESTS_BATCH_SIZE: ${ECS_REQUESTS_BATCH_SIZE:-20}
MAX_NLP_PROCESSING_ATTEMPTS: ${MAX_NLP_PROCESSING_ATTEMPTS:-3}
# AWS
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID:-}
AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY:-}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
AWS_S3_REGION_NAME: ${AWS_S3_REGION_NAME}
# Celery
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://redis:6379}
# Cron
CRON_DEEP_FETCH_MINUTE: ${CRON_DEEP_FETCH_MINUTE:-0}
CRON_DEEP_FETCH_HOUR: ${CRON_DEEP_FETCH_HOUR:-*}
CRON_CREATE_INDICES_MINUTE: ${ON_CREATE_INDICES_MINUTE:-0}
CRON_CREATE_INDICES_HOUR: ${ON_CREATE_INDICES_HOUR:-*}
CRON_RESEND_ECS_REQUEST_MINUTES: ${CRON_RESEND_ECS_REQUEST_MINUTES:-15}
# DEEP
DEEP_DB_PASSWORD: ${DEEP_DB_PASSWORD:?DEEP password not set}
DEEP_DB_NAME: ${DEEP_DB_NAME:?DEEP db name not set}
DEEP_DB_USER: ${DEEP_DB_USER:?DEEP db user not set}
DEEP_DB_PORT: ${DEEP_DB_PORT:-5432}
DEEP_DB_HOST: ${DEEP_DB_HOST:-host.docker.internal}
# MOCKSERVER
MOCKSERVER_PORT: ${MOCKSERVER_PORT:-8081}
# ECS endpoints
CLASSIFICATION_MODEL_ENDPOINT: ${CLASSIFICATION_MODEL_ENDPOINT}
SUMMARIZATION_V3_ECS_ENDPOINT: ${SUMMARIZATION_V3_ECS_ENDPOINT:?Provide summarization v3 endpoint}
TEXTEXTRACTION_ECS_ENDPOINT: ${TEXTEXTRACTION_ECS_ENDPOINT:?Provide text extraction endpoint}
ENTRYEXTRACTION_ECS_ENDPOINT: ${ENTRYEXTRACTION_ECS_ENDPOINT:?Provide entry extraction endpoint}
GEOLOCATION_ECS_ENDPOINT: ${GEOLOCATION_ECS_ENDPOINT:?Provide geolocation endpoint}
TOPICMODEL_ECS_ENDPOINT: ${TOPICMODEL_ECS_ENDPOINT:?Provide topic model endpoint}
# SENTRY
SENTRY_DSN: ${SENTRY_DSN:-}
SENTRY_TRACES_SAMPLE_RATE: ${SENTRY_TRACES_SAMPLE_RATE:-0.2}
# MODEL_INFO
CLASSIFICATION_MODEL_ID: ${CLASSIFICATION_MODEL_ID:-classification-model}
CLASSIFICATION_MODEL_VERSION: ${CLASSIFICATION_MODEL_VERSION:-1.0.0}
GEOLOCATION_MODEL_ID: ${GEOLOCATION_MODEL_ID:-geolocation-model}
GEOLOCATION_MODEL_VERSION: ${GEOLOCATION_MODEL_VERSION:-1.0.0}
RELIABILITY_MODEL_ID: ${RELIABILITY_MODEL_ID:-reliability-model}
RELIABILITY_MODEL_VERSION: ${RELIABILITY_MODEL_VERSION:-1.0.0}
volumes:
- ./:/code/
tty: true
depends_on:
- db
- redis
services:
db:
image: postgres:14
environment:
<<: *base-environment
volumes:
- deepl-db:/var/lib/postgresql/data
command: -p 5432
redis:
image: redis:7-alpine
server:
<<: *base-server-config
ports:
- "9000:8000"
command: bash -c '/code/scripts/run_dev.sh server'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- "./media:/tmp/media"
- "./:/code"
celery:
<<: *base-server-config
command: bash -c '/code/scripts/run_dev.sh celery'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- "./media:/tmp/media"
- "./:/code"
celery_beat:
<<: *base-server-config
command: bash -c '/code/scripts/run_dev.sh beat'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- "./media:/tmp/media"
- "./:/code"
volumes:
deepl-db: