-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathdocker-compose-base.yml
45 lines (45 loc) · 2.47 KB
/
docker-compose-base.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
services:
libcommon:
environment:
# common
COMMON_BLOCKED_DATASETS: ${COMMON_BLOCKED_DATASETS-}
COMMON_HF_ENDPOINT: ${COMMON_HF_ENDPOINT-https://huggingface.co}
COMMON_HF_TOKEN: ${COMMON_HF_TOKEN-}
# log
LOG_LEVEL: ${LOG_LEVEL-INFO}
# huggingface_hub
HF_ENDPOINT: ${COMMON_HF_ENDPOINT-https://huggingface.co} # see https://github.com/huggingface/datasets/pull/5196#issuecomment-1322191411
# cache
CACHE_MONGO_URL: ${CACHE_MONGO_URL-mongodb://mongodb:${MONGO_PORT:-27017}} # use mongo container by default (with custom port)
CACHE_MONGO_DATABASE: ${CACHE_MONGO_DATABASE-dataset_viewer_cache}
# queue
QUEUE_MONGO_URL: ${QUEUE_MONGO_URL-mongodb://mongodb:${MONGO_PORT:-27017}} # use mongo container by default (with custom port)
QUEUE_MONGO_DATABASE: ${QUEUE_MONGO_DATABASE-dataset_viewer_queue}
# assets
ASSETS_BASE_URL: ${ASSETS_BASE_URL} # <- must be set, no default value. If local, set to work with the reverse-proxy, like http://localhost:${PORT_REVERSE_PROXY-8000}/assets
ASSETS_STORAGE_ROOT: ${ASSETS_STORAGE_ROOT-/storage/assets}
ASSETS_STORAGE_PROTOCOL: ${ASSETS_STORAGE_PROTOCOL-file}
# cached assets
CACHED_ASSETS_BASE_URL: ${CACHED_ASSETS_BASE_URL} # <- must be set, no default value. If local, set to work with the reverse-proxy, like http://localhost:${PORT_REVERSE_PROXY-8000}/cached-assets
CACHED_ASSETS_STORAGE_ROOT: ${CACHED_ASSETS_STORAGE_ROOT-/storage/cached-assets}
CACHED_ASSETS_STORAGE_PROTOCOL: ${CACHED_ASSETS_STORAGE_PROTOCOL-file}
# S3
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID-}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY-}
S3_REGION_NAME: ${S3_REGION_NAME-us-east-1}
# cloudfront (for signed URLs)
CLOUDFRONT_EXPIRATION_SECONDS: ${CLOUDFRONT_EXPIRATION_SECONDS-3600}
CLOUDFRONT_KEY_PAIR_ID: ${CLOUDFRONT_KEY_PAIR_ID-}
CLOUDFRONT_PRIVATE_KEY: ${CLOUDFRONT_PRIVATE_KEY-}
libapi:
extends: libcommon
environment:
NUMBA_CACHE_DIR: ${NUMBA_CACHE_DIR-/numba-cache}
# service
API_HF_AUTH_PATH: ${API_HF_AUTH_PATH-/api/datasets/%s/auth-check}
API_HF_JWT_PUBLIC_KEY_URL: ${API_HF_JWT_PUBLIC_KEY_URL}
API_HF_JWT_ADDITIONAL_PUBLIC_KEYS: ${API_HF_JWT_ADDITIONAL_PUBLIC_KEYS}
API_HF_JWT_ALGORITHM: ${API_HF_JWT_ALGORITHM-EdDSA}
API_HF_TIMEOUT_SECONDS: ${API_HF_TIMEOUT_SECONDS-0.2}
API_MAX_AGE_LONG: ${API_MAX_AGE_LONG-120}
API_MAX_AGE_SHORT: ${API_MAX_AGE_SHORT-10}