Skip to content

Commit

Permalink
Merge pull request #6 from agent87/dev
Browse files Browse the repository at this point in the history
NEw Strucutre
  • Loading branch information
agent87 committed Jan 22, 2024
2 parents 19075a0 + 72ddc18 commit 890cf02
Show file tree
Hide file tree
Showing 38 changed files with 1,092 additions and 202 deletions.
38 changes: 18 additions & 20 deletions docker-compose.dev.yml → .docker/compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,46 @@ version: '3'
services:
stt:
build:
context: ./stt
context: ../stt
container_name: stt
expose:
- 8000
ports:
- 8000:8000
volumes:
- ./stt/:/api/:ro
- ./utils/:/api/utils/:ro
- ./stt/sounds/:/api/sounds/:rw
- ../stt/:/api/:ro
- ../utils/:/api/utils/:ro
- ../stt/sounds/:/api/sounds/:rw
depends_on:
- mongo
env_file:
- "./.env"
- "../.env"
networks:
- deepspeech
tts:
build:
context: ./tts
context: ../tts
container_name: tts
expose:
- 8000
ports:
- 8000:8000
volumes:
- ./tts/:/api/:ro
- ./utils/:/api/utils/:ro
- ./stt/sounds/:/api/sounds/:rw
- ../tts/:/api/:ro
- ../utils/:/api/utils/:ro
- ../stt/sounds/:/api/sounds/:rw
depends_on:
- mongo
env_file:
- "./.env"
- "../.env"
networks:
- deepspeech
nginx:
image: nginx:latest
container_name: nginx_deepspeech
ports:
- 80:80
- 443:443
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./docs/redoc-static.html:/usr/share/nginx/html/redoc-static.html:ro
- /etc/letsencrypt/:/etc/letsencrypt/:ro
- ../nginx/dev/nginx.conf:/etc/nginx/nginx.conf:ro
- ../docs/redoc-static.html:/usr/share/nginx/html/redoc-static.html:ro
env_file:
- "./.env"
- "../.env"
networks:
- deepspeech
depends_on:
Expand All @@ -57,7 +55,7 @@ services:
ports:
- 27017:27017
env_file:
- "./.env"
- "../.env"
networks:
- deepspeech

Expand Down
3 changes: 0 additions & 3 deletions .vscode/launch.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

4 changes: 4 additions & 0 deletions demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM python:3.10.9


WORKDIR /demo
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
- 80:80
- 443:443
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./nginx/prod/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./docs/redoc-static.html:/usr/share/nginx/html/redoc-static.html:ro
- /etc/letsencrypt/:/etc/letsencrypt/:ro
env_file:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
data:
DOMAIN: <Replace your DOMAIN here>
LOG_LEVEL: INFO
MAX_SPEECH_AUDIO_FILE_SIZE: "1000"
MONGO_HOST: mongo
MONGO_INITDB_DATABASE: Inference
MONGO_INITDB_ROOT_PASSWORD: Bingo123
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_PORT: "27017"
MONGO_STT_COLLECTION: STT_INFERENCE_LOGS
MONGO_TTS_COLLECTION: TTS_INFERENCE_LOGS
PYTHONUNBUFFERED: "1"
SERVER_IP_ADDRESS: <Replace your SERVER_IP_ADDRESS here>
TTS_MAX_TXT_LEN: "1000"
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: mongo-Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
65 changes: 0 additions & 65 deletions k8s/deployment.yaml

This file was deleted.

102 changes: 102 additions & 0 deletions k8s/mongo-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: mongo
name: mongo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mongo
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.network/rw-deepspeech-api-deepspeech: "true"
io.kompose.service: mongo
spec:
containers:
- env:
- name: DOMAIN
valueFrom:
configMapKeyRef:
key: DOMAIN
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
key: LOG_LEVEL
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MAX_SPEECH_AUDIO_FILE_SIZE
valueFrom:
configMapKeyRef:
key: MAX_SPEECH_AUDIO_FILE_SIZE
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_HOST
valueFrom:
configMapKeyRef:
key: MONGO_HOST
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_INITDB_DATABASE
valueFrom:
configMapKeyRef:
key: MONGO_INITDB_DATABASE
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_INITDB_ROOT_PASSWORD
valueFrom:
configMapKeyRef:
key: MONGO_INITDB_ROOT_PASSWORD
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_INITDB_ROOT_USERNAME
valueFrom:
configMapKeyRef:
key: MONGO_INITDB_ROOT_USERNAME
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_PORT
valueFrom:
configMapKeyRef:
key: MONGO_PORT
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_STT_COLLECTION
valueFrom:
configMapKeyRef:
key: MONGO_STT_COLLECTION
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: MONGO_TTS_COLLECTION
valueFrom:
configMapKeyRef:
key: MONGO_TTS_COLLECTION
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: PYTHONUNBUFFERED
valueFrom:
configMapKeyRef:
key: PYTHONUNBUFFERED
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: SERVER_IP_ADDRESS
valueFrom:
configMapKeyRef:
key: SERVER_IP_ADDRESS
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
- name: TTS_MAX_TXT_LEN
valueFrom:
configMapKeyRef:
key: TTS_MAX_TXT_LEN
name: Users-kayarn-Desktop-Sources-nosync-RW-DEEPSPEECH-API--env
image: mongo:latest
name: mongo-db-deepspeech
ports:
- containerPort: 27017
hostPort: 27017
protocol: TCP
resources: {}
restartPolicy: Always
status: {}
19 changes: 19 additions & 0 deletions k8s/mongo-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml
kompose.version: 1.31.2 (HEAD)
creationTimestamp: null
labels:
io.kompose.service: mongo
name: mongo
spec:
ports:
- name: "27017"
port: 27017
targetPort: 27017
selector:
io.kompose.service: mongo
status:
loadBalancer: {}
14 changes: 14 additions & 0 deletions k8s/nginx-claim0-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx-claim0
name: nginx-claim0
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}
14 changes: 14 additions & 0 deletions k8s/nginx-claim1-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx-claim1
name: nginx-claim1
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}
14 changes: 14 additions & 0 deletions k8s/nginx-claim2-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: nginx-claim2
name: nginx-claim2
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}
Loading

0 comments on commit 890cf02

Please sign in to comment.