-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (96 loc) · 2.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
101 lines (96 loc) · 2.65 KB
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
version: '3.8'
services:
redis:
image: redis:7-alpine
container_name: mediagrand-redis
command: redis-server --bind 0.0.0.0 --protected-mode no --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
networks:
- mediagrand-network
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
mediagrand-api:
build:
context: .
dockerfile: docker/Dockerfile
ports:
- "8086:8080"
environment:
# V1 API Configuration
API_VERSION: ${API_VERSION:-v1}
VERSION: ${VERSION:-1.0.0}
API_PREFIX: ${API_PREFIX:-/api/v1}
# Authentication & JWT
API_KEY: ${API_KEY:-}
ADMIN_USERNAME: ${ADMIN_USERNAME:-}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-}
JWT_ALGORITHM: ${JWT_ALGORITHM:-HS256}
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: ${JWT_ACCESS_TOKEN_EXPIRE_MINUTES:-30}
# Application
APP_DEBUG: ${APP_DEBUG:-false}
APP_DOMAIN: ${APP_DOMAIN}
APP_NAME: ${APP_NAME}
APP_URL: ${APP_URL}
DEFAULT_PLACEHOLDER_VIDEO: ${DEFAULT_PLACEHOLDER_VIDEO}
GCP_BUCKET_NAME: ${GCP_BUCKET_NAME}
GCP_SA_CREDENTIALS: ${GCP_SA_CREDENTIALS}
GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-300}
GUNICORN_WORKERS: ${GUNICORN_WORKERS:-2}
LOCAL_STORAGE_PATH: ${LOCAL_STORAGE_PATH}
PIXABAY_API_KEY: ${PIXABAY_API_KEY}
REDIS_URL: redis://redis:6379/0
RQ_WORKERS: ${RQ_WORKERS:-2}
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_BUCKET_NAME: ${S3_BUCKET_NAME}
S3_ENDPOINT_URL: ${S3_ENDPOINT_URL}
S3_REGION: ${S3_REGION}
S3_SECRET_KEY: ${S3_SECRET_KEY}
WHISPER_CACHE_DIR: /opt/whisper_cache
volumes:
- whisper_models:/opt/whisper_cache
- mediagrand_data:/app/data
- gcp-sa-credentials:/app/gcp-sa-credentials
- tmp-assets:/tmp
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- mediagrand-network
logging:
driver: json-file
options:
max-size: "200m"
max-file: "3"
volumes:
whisper_models:
driver: local
mediagrand_data:
driver: local
gcp-sa-credentials:
driver: local
tmp-assets:
driver: local
redis_data:
driver: local
networks:
mediagrand-network:
driver: bridge