-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
125 lines (117 loc) · 3.42 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
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
version: "3.4"
services:
localstack:
image: localstack/localstack:3.0
container_name: cn_localstack
ports:
- "4566:4566"
- "4510-4559:4510-4559"
environment:
- SERVICES=sns,sqs
volumes:
- ./localstack/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:4566/_localstack/init/ready | grep -q '\"completed\": true'"]
networks:
cloud_notebook_net:
ipv4_address: 172.22.2.2
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
image: cloud.notebook/api-gateway:1
ports:
- "8080:8080"
networks:
- cloud_notebook_net
minio:
image: minio/minio:RELEASE.2024-03-10T02-53-48Z
container_name: minio
hostname: minio
ports:
- "9000:9000"
- "9001:9001"
entrypoint: sh
command: -c 'mkdir -p /data/audio-resources && minio server /data --console-address ":9001"'
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
MINIO_DOMAIN: minio
networks:
cloud_notebook_net:
aliases:
- audio-resources.minio
audio-service:
build:
context: ./audio-service
dockerfile: Dockerfile
image: cloud.notebook/audio-service:1
depends_on:
audio-db:
condition: service_started
minio:
condition: service_started
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://audio-pstg-db:5432/audio_db
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: password
SPRING_CLOUD_AWS_ENDPOINT: "http://172.22.2.2:4566"
SPRING_CLOUD_AWS_S3_ENDPOINT: "http://minio:9000"
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
AWS_REGION: us-east-1
NOTEBOOK_AUDIO_SERVICE_S3_BUCKET: audio-resources
NOTEBOOK_AUDIO_SERVICE_SNS_NAME: stored-audio-sns
networks:
- cloud_notebook_net
audio-db:
image: postgres:15.5-alpine
container_name: audio-pstg-db
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: audio_db
networks:
- cloud_notebook_net
transcription-service:
build:
context: ./transcription-service
dockerfile: Dockerfile
image: cloud.notebook/transcription-service:1
depends_on:
localstack:
condition: service_healthy
environment:
SPRING_CLOUD_AWS_ENDPOINT: "http://172.22.2.2:4566"
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
NOTEBOOK_TRANSCRIPTION_SQS_NAME: audio-transcription-sqs
NOTEBOOK_AUDIO_SERVICE_ENDPOINT: "http://audio-service:8080"
NOTEBOOK_OPENAI_KEY: ${OPENAI_API_KEY}
NOTEBOOK_TRANSCRIPT_SERVICE_ENDPOINT: "http://transcript-service:8080"
networks:
- cloud_notebook_net
transcript-service:
build:
context: ./transcript-service
dockerfile: Dockerfile
image: cloud.notebook/transcript-service:1
depends_on:
minio:
condition: service_started
environment:
SPRING_CLOUD_AWS_S3_ENDPOINT: "http://minio:9000"
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
AWS_REGION: us-east-1
NOTEBOOK_TRANSCRIPT_SERVICE_S3_BUCKET: audio-resources
networks:
- cloud_notebook_net
networks:
cloud_notebook_net:
ipam:
config:
- subnet: 172.22.0.0/16
ip_range: 172.22.5.0/24