2
0
Fork 0
backend/docker-compose.yml

166 lines
2.9 KiB
YAML

version: "3"
services:
traefik:
image: traefik
command: --configfile=/traefik.toml
depends_on:
- core
- signal
- heartbeat
- bite
- publish
- subscribe
- transcription
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- ./traefik.toml:/traefik.toml
networks:
- traefiknet
pg:
build: ./backend-core/postgres
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=
- POSTGRES_DB=core
ports:
- "5432:5432" # Close this for production
networks:
- pgnet
nats:
image: nats:latest
ports: # Close these for production
- "4222:4222"
- "6222:6222"
- "8222:8222"
networks:
- natsnet
redis:
image: redis:latest
ports:
- "6379:6379" # Close this for production
networks:
- redisnet
core:
build: ./backend-core
tty: true
restart: unless-stopped
depends_on:
- pg
environment:
- LISTEN=:80
- POSTGRES=postgresql://root@pg:5432/core?sslmode=disable
networks:
- pgnet
- traefiknet
signal:
build: ./backend-signal
tty: true
restart: unless-stopped
environment:
- PORT=80
networks:
- traefiknet
heartbeat:
build: ./backend-heartbeat
tty: true
restart: unless-stopped
depends_on:
- redis
environment:
- LISTEN=:80
- REDIS=redis:6379
networks:
- redisnet
- traefiknet
login:
build: ./backend-login
tty: true
restart: unless-stopped
environment:
- LISTEN=:10204
- SECRET=secret
ports:
- "10204:10204"
# Pipeline
bite:
build: ./backend-bite
tty: true
restart: unless-stopped
depends_on:
- nats
environment:
- LISTEN=:80
- NATS=nats://nats:4222
networks:
- natsnet
- traefiknet
publish:
build: ./backend-publish
tty: true
restart: unless-stopped
depends_on:
- nats
environment:
- LISTEN=:80
- NATS=nats://nats:4222
- SECRET=secret
networks:
- natsnet
- traefiknet
store:
build: ./backend-store
tty: true
restart: unless-stopped
depends_on:
- nats
environment:
- NATS=nats://nats:4222
- DBPATH=/tmp/badger
networks:
- natsnet
subscribe:
build: ./backend-subscribe
tty: true
restart: unless-stopped
depends_on:
- nats
environment:
- LISTEN=:80
- NATS=nats://nats:4222
networks:
- natsnet
- traefiknet
transcription:
build: ./backend-transcription
tty: true
restart: unless-stopped
depends_on:
- nats
environment:
- LISTEN=:80
- NATS=nats://nats:4222
- API_KEY=AIzaSyDxSXDefzw9gXCQaVzOCYlRn_vcC9Da9Q0
networks:
- natsnet
- traefiknet
networks:
pgnet:
natsnet:
redisnet:
traefiknet: