-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
52 lines (49 loc) · 1.36 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
43
44
45
46
47
48
49
50
51
52
services:
postgres:
container_name: postgres
image: postgres
env_file: .env
volumes:
- db:/var/lib/postgresql/data
- ./database.sql:/docker-entrypoint-initdb.d/create_tables.sql
ports:
- "5432:5432"
security_opt:
- no-new-privileges:true
app:
container_name: app
image: chatbot
build: .
platform: linux/amd64
environment:
AWS_REGION: ${AWS_REGION}
AWS_DEFAULT_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
POSTGRES_HOST: postgres
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel:4317
OTEL_RESOURCE_ATTRIBUTES: service.namespace=ai-chatbot.local,service.name=orchestrator
env_file: .env
ports:
- "8080:8080"
read_only: true
security_opt:
- no-new-privileges:true
tmpfs:
- /app/tmp
depends_on:
- postgres
- otel
otel:
image: public.ecr.aws/aws-observability/aws-otel-collector:latest
command: ["--config=/etc/ecs/ecs-default-config.yaml"]
environment:
AWS_REGION: ${AWS_REGION}
AWS_DEFAULT_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
volumes:
db:
driver: local