-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.services.yml
157 lines (151 loc) · 5.14 KB
/
docker-compose.services.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
services:
db:
image: postgres:12.22
healthcheck:
test: ["CMD", "pg_isready"]
interval: 3s
timeout: 3s
retries: 10
ports:
- ${PGPORT}:${PGPORT}
env_file:
- path: env/shared.env
- path: env/shared.local.env
required: false
- path: env/backend.env
- path: env/backend.local.env
required: false
# DEPRECATED: legacy .env file at the repo root
- path: .env
required: false
environment:
- PGPORT=${PGPORT:-5433}
- PGUSER=${PGUSER:-postgres}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
volumes:
- pgdata:/var/lib/postgresql
- ./config/postgres:/docker-entrypoint-initdb.d
redis:
image: redis:7.4.2
healthcheck:
test: ["CMD", "redis-cli", "ping", "|", "grep", "PONG"]
interval: 3s
timeout: 3s
retries: 10
ports:
- "6379"
nginx:
build:
context: ./nginx
ports:
- ${NGINX_PORT:-8002}:${NGINX_PORT:-8002}
links:
- web
env_file:
- path: env/shared.env
- path: env/shared.local.env
required: false
- path: env/backend.env
- path: env/backend.local.env
required: false
# DEPRECATED: legacy .env file at the repo root
- path: .env
required: false
environment:
PORT: ${NGINX_PORT:-8002}
NGINX_UWSGI_PASS: ${NGINX_UWSGI_PASS:-"web:8001"}
volumes:
- ./config:/etc/nginx/templates
litellm:
build:
dockerfile: Dockerfile-litellm
ports:
- "4000:4000"
env_file:
- path: env/shared.env
- path: env/shared.local.env
required: false
- path: env/backend.env
- path: env/backend.local.env
required: false
# DEPRECATED: legacy .env file at the repo root
- path: .env
required: false
environment:
- DATABASE_URL=${LITELLM_DATABASE_URL:-postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${PGPORT}/litellm}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LITELLM_MASTER_KEY=${AI_PROXY_AUTH_TOKEN}
- LITELLM_SALT_KEY=${AI_PROXY_AUTH_TOKEN}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./config:/app
keycloak:
image: quay.io/keycloak/keycloak:latest
depends_on:
- db
ports:
- ${KEYCLOAK_PORT}:${KEYCLOAK_PORT}
- ${KEYCLOAK_SSL_PORT}:${KEYCLOAK_SSL_PORT}
env_file:
- path: env/shared.env
- path: env/shared.local.env
required: false
- path: env/backend.env
- path: env/backend.local.env
required: false
# DEPRECATED: legacy .env file at the repo root
- path: .env
required: false
environment:
- KEYCLOAK_ADMIN=${KEYCLOAK_SVC_ADMIN:-admin}
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_SVC_ADMIN_PASSWORD:-admin}
networks:
default:
aliases:
- ${KEYCLOAK_SVC_HOSTNAME:-kc.ol.local}
command: start --verbose --features scripts --import-realm --hostname=${KEYCLOAK_SVC_HOSTNAME:-kc.ol.local} --hostname-strict=false --hostname-debug=true --https-port=${KEYCLOAK_SSL_PORT} --https-certificate-file=/etc/x509/https/tls.crt --https-certificate-key-file=/etc/x509/https/tls.key --http-enabled=true --http-port=${KEYCLOAK_PORT} --config-keystore=/etc/keycloak-store --config-keystore-password=${KEYCLOAK_SVC_KEYSTORE_PASSWORD} --db=postgres --db-url-database=keycloak --db-url-host=db --db-schema=public --db-password=${POSTGRES_PASSWORD:-postgres} --db-username=postgres --db-url-port=${PGPORT:-5433}
volumes:
- keycloak-store:/etc/keycloak-store
- ./config/keycloak/tls:/etc/x509/https
- ./config/keycloak/realms:/opt/keycloak/data/import
apigateway:
image: apache/apisix:latest
depends_on:
- keycloak
env_file:
- path: env/shared.env
- path: env/shared.local.env
required: false
- path: env/backend.env
- path: env/backend.local.env
required: false
# DEPRECATED: legacy .env file at the repo root
- path: .env
required: false
environment:
- KEYCLOAK_REALM=${KEYCLOAK_REALM:-ol-local}
- KEYCLOAK_CLIENT_ID=${KEYCLOAK_CLIENT_ID:-apisix}
- KEYCLOAK_CLIENT_SECRET=${KEYCLOAK_CLIENT_SECRET}
- KEYCLOAK_DISCOVERY_URL=${KEYCLOAK_DISCOVERY_URL:-https://kc.ol.local:8006/realms/ol-local/.well-known/openid-configuration}
- KEYCLOAK_SCOPES=${KEYCLOAK_SCOPES:-openid profile email}
- APISIX_PORT=${APISIX_PORT:-8005}
- APISIX_SESSION_SECRET_KEY=${APISIX_SESSION_SECRET_KEY:-something_at_least_16_characters}
- APISIX_LOGOUT_URL=${APISIX_LOGOUT_URL:-http://ai.open.odl.local:8003/}
- NGINX_PORT=${NGINX_PORT:-8002}
ports:
- ${APISIX_PORT}:${APISIX_PORT}
volumes:
- ./config/apisix/config.yaml:/usr/local/apisix/conf/config.yaml
- ./config/apisix/apisix.yaml:/usr/local/apisix/conf/apisix.yaml
- ./config/apisix/debug.yaml:/usr/local/apisix/conf/debug.yaml
volumes:
pgdata:
# note: these are here instead of docker-compose.apps.yml because `extends` doesn't pull them in
django_media:
yarn-cache:
keycloak-store: