-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
94 lines (91 loc) · 2.09 KB
/
Copy pathcompose.yaml
File metadata and controls
94 lines (91 loc) · 2.09 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
services:
app:
restart: always
domainname: ask.defang.io
x-defang-dns-role: arn:aws:iam::258338292852:role/dnsadmin-39a19c3
platform: linux/amd64
build:
context: ./app
dockerfile: Dockerfile
ports:
- target: 5050
published: 5050
protocol: tcp
mode: ingress
environment:
ASK_TOKEN:
DEBUG: 1
FLASK_APP: app.py
REBUILD_TOKEN:
SECRET_KEY:
SEGMENT_WRITE_KEY:
SESSION_COOKIE_SECURE: 1
OPENAI_API_KEY: ${OPENAI_API_KEY} # Set your OpenAI API key here or in the .env file
OPENAI_BASE_URL: "http://llm/api/v1"
MODEL: "ai/claude3-haiku"
INTERCOM_TOKEN:
INTERCOM_ADMIN_ID:
REDIS_URL: redis://redis:6379/0
deploy:
resources:
reservations:
memory: 4G
cpus: 1.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5050/"]
interval: 30s
timeout: 10s
retries: 5
start_period: 240s
depends_on:
- redis
- llm
redis:
image: redis:alpine
ports:
- target: 6379
published: 6379
protocol: tcp
mode: host
llm:
image: defangio/openai-access-gateway
x-defang-llm: true
ports:
- target: 80
published: 80
protocol: tcp
mode: host
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
healthcheck:
test:
- CMD
- python3
- -c
- import sys, urllib.request; sys.exit(0 if urllib.request.urlopen('http://localhost/health').getcode() == 200 else 1)
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
discord-bot:
restart: unless-stopped
build:
context: ./discord-bot
dockerfile: Dockerfile
ports:
- mode: ingress
target: 3000
published: 3000
environment:
DISCORD_APP_ID:
DISCORD_TOKEN:
DISCORD_PUBLIC_KEY:
ASK_TOKEN:
deploy:
resources:
reservations:
memory: 256M
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
depends_on:
- app