forked from yudhiesh/llms-in-production-week-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (41 loc) · 1.33 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
services:
streamlit-app:
build:
context: ./
dockerfile: Dockerfile
args:
# Define required args for the container
GUARDRAILS_TOKEN: ${GUARDRAILS_TOKEN}
OPENAI_API_KEY: ${OPENAI_API_KEY}
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GUARDRAILS_TOKEN=${GUARDRAILS_TOKEN}
# Map port 8080 of the container to port 8080 on the host
# This allows the Streamlit app to be accessed from the host machine
ports:
- "8080:8080"
# Mount volumes for live code updating
# This maps the src directory and .streamlit configuration
# from your host to the container
volumes:
- ./src:/app/src
- ./.streamlit:/app/.streamlit
healthcheck:
test: ["CMD", "wget", "--spider", "http://0.0.0.0:8080/healthz"]
interval: 3s
timeout: 1s
retries: 3
depends_on:
# Ensure that the Phoenix service is started before the Streamlit app
- phoenix
- redis
# Define the Phoenix service for tracing and monitoring
phoenix:
image: arizephoenix/phoenix:latest # Use the latest version of the Phoenix image
ports:
- "6006:6006" # Expose port 6006 for the UI and OTLP HTTP collector
- "4317:4317" # Expose port 4317 for OTLP gRPC collector
redis:
image: redis/redis-stack:latest
ports:
- "6379:6379"