-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.api.yml
62 lines (59 loc) · 2.33 KB
/
docker-compose.api.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
# Each docker container can be configured with environment variables. Many of
# these variables point the container to the other services, which may be other
# containers you have deployed or centrally-hosted Braintrust services.
#
# - REDIS_URL: Connection URI for the redis instance for internal container use.
# The general form of the URI is
# `redis://[user[:password]@][host][:port][/db-number][?param1=value1¶m2=value2...]`.
# Defaults to the URI for the `braintrust-redis` docker service.
#
# - PG_URL: Connection URI for the postgres instance for internal container use.
# The general form of the URI is
# `postgresql://[user[:password]@][host][:port][/dbname][?param1=value1¶m2=value2...]`.
# Defaults to the URI for the 'braintrust-postgres' docker service. See
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS
# for full details on the URI spec.
version: "3.1"
services:
braintrust-redis:
image: public.ecr.aws/braintrust/redis:latest
ports:
- 6479:6379
extra_hosts:
- "host.docker.internal:host-gateway"
braintrust-postgres:
image: public.ecr.aws/braintrust/postgres:latest
command: postgres -c config_file=/etc/postgresql.conf
environment:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5532:5432
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- api_pg_volume:/var/lib/postgresql/data
braintrust-standalone-api:
image: public.ecr.aws/braintrust/standalone-api:latest
environment:
# This variable instructs the API to connect to the centrally-hosted
# components.
CHALICE_LOCAL_USE_PROD_ENV: 1
PG_URL: postgres://postgres:postgres@host.docker.internal:5532/postgres
REDIS_URL: redis://host.docker.internal:6479/0
# If you are deploying any other services yourself, such as the proxy or
# realtime, you may override their URLs here as well (PROXY_URL and
# REALTIME_URL, respectively). See the environment settings in
# docker-compose.full.yml for a starting point.
ports:
- 8000:8000
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
braintrust-redis:
condition: service_healthy
braintrust-postgres:
condition: service_healthy
volumes:
api_pg_volume: null