2
0
Fork 0
backend/docker-compose.yml

215 lines
4.1 KiB
YAML
Raw Permalink Normal View History

2019-02-10 18:56:49 +08:00
version: "3"
services:
2019-02-20 02:00:59 +08:00
traefik:
image: traefik
command: --configfile=/traefik.toml
depends_on:
- core
- heartbeat
- auth
- pictures
- webrtc
- store
2019-02-20 02:00:59 +08:00
ports:
- "80:80"
- "443:443"
2019-02-24 12:01:18 +08:00
- "1837:1837"
2019-02-20 02:00:59 +08:00
- "8080:8080"
volumes:
- ./traefik.toml:/traefik.toml
networks:
- traefiknet
2019-02-24 04:03:41 +08:00
- authnet
2019-02-20 02:00:59 +08:00
2019-02-10 18:56:49 +08:00
pg:
2019-02-16 13:01:02 +08:00
build: ./backend-core/postgres
2019-02-10 18:56:49 +08:00
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=
- POSTGRES_DB=core
ports:
- "5432:5432" # Close this for production
networks:
- pgnet
2019-06-20 23:14:44 +08:00
2019-02-10 18:56:49 +08:00
nats:
image: nats:latest
ports: # Close these for production
- "4222:4222"
- "6222:6222"
- "8222:8222"
networks:
- natsnet
2019-02-18 03:27:42 +08:00
redis:
image: redis:latest
ports:
- "6379:6379" # Close this for production
networks:
- redisnet
2019-06-20 23:14:44 +08:00
minio:
image: minio/minio:latest
environment:
- MINIO_ACCESS_KEY=MINIO_ID
- MINIO_SECRET_KEY=MINIO_KEY
ports:
- "9000:9000"
volumes:
- ./files:/export
command: minio server /export
networks:
- minionet
2019-02-10 18:56:49 +08:00
core:
build: ./backend-core
2019-02-18 03:27:42 +08:00
tty: true
2019-02-10 18:56:49 +08:00
restart: unless-stopped
2019-02-18 03:27:42 +08:00
depends_on:
- pg
2019-02-18 23:44:25 +08:00
environment:
2019-02-20 02:00:59 +08:00
- LISTEN=:80
2019-02-18 23:44:25 +08:00
- POSTGRES=postgresql://root@pg:5432/core?sslmode=disable
2019-02-10 18:56:49 +08:00
networks:
- pgnet
2019-02-20 02:00:59 +08:00
- traefiknet
2019-10-22 16:59:33 +08:00
- natsnet
2019-02-10 20:19:38 +08:00
2019-02-18 03:27:42 +08:00
heartbeat:
build: ./backend-heartbeat
tty: true
restart: unless-stopped
depends_on:
- redis
2019-02-18 23:44:25 +08:00
environment:
2019-02-20 02:00:59 +08:00
- LISTEN=:80
2019-02-18 23:44:25 +08:00
- REDIS=redis:6379
2019-02-18 03:27:42 +08:00
networks:
- redisnet
2019-02-20 02:00:59 +08:00
- traefiknet
2019-02-18 03:27:42 +08:00
login:
build: ./backend-login
tty: true
restart: unless-stopped
2019-06-15 03:17:18 +08:00
depends_on:
- pg
- redis
- core
2019-06-23 07:50:37 +08:00
volumes:
- ${PWD}/key:/key
2019-02-18 23:44:25 +08:00
environment:
2019-02-24 12:01:18 +08:00
- LISTEN=:80
2019-02-18 23:44:25 +08:00
- SECRET=secret
2019-02-24 12:01:18 +08:00
- POSTGRES=postgresql://root@pg:5432/core?sslmode=disable
- REDIS=redis:6379
- TTL=120s
- MESSAGING_SID=MG19d18fafcff1f3f34dff04c5b04c0699
- TWILIO_SID=AC22ea3eea85e5108a96b947aea8ab1320
- TWILIO_TOKEN=fb23fa1a1564aa9f62a7a3117f07b3a0
2019-06-15 03:17:18 +08:00
- CORE_URL=http://core/user
2019-02-24 12:01:18 +08:00
networks:
- traefiknet
- redisnet
- pgnet
2019-02-18 03:27:42 +08:00
2019-02-24 04:03:41 +08:00
auth:
build: ./backend-auth
tty: true
restart: unless-stopped
2019-06-23 07:50:37 +08:00
volumes:
- ${PWD}/key.pub:/key.pub
2019-02-24 04:03:41 +08:00
environment:
- LISTEN=0.0.0.0:10205
2019-02-24 04:03:41 +08:00
- SECRET=secret
ports:
- "10205:10205" # Remove this for production
networks:
- authnet
2019-06-20 23:14:44 +08:00
pictures:
build: ./backend-pictures
tty: true
restart: unless-stopped
depends_on:
- minio
environment:
- LISTEN=:80
- MINIO_ENDPOINT=minio:9000
- MINIO_ID=MINIO_ID
- MINIO_KEY=MINIO_KEY
- MINIO_BUCKET_NAME=beep
- MINIO_LOCATION=us-east-1
networks:
- traefiknet
- minionet
2019-06-23 04:57:47 +08:00
# Permissions
permissions:
build: ./backend-permissions
tty: true
restart: unless-stopped
depends_on:
- redis
- pg
environment:
- LISTEN=:80
- POSTGRES=postgresql://root@pg:5432/core?sslmode=disable
- REDIS=redis:6379
networks:
- pgnet
- redisnet
- permissionsnet
2019-02-18 03:27:42 +08:00
# Pipeline
webrtc:
build: ./backend-webrtc
2019-02-18 03:27:42 +08:00
tty: true
restart: unless-stopped
depends_on:
- nats
2019-02-18 23:44:25 +08:00
environment:
2019-02-20 02:00:59 +08:00
- LISTEN=:80
2019-02-18 23:44:25 +08:00
- NATS=nats://nats:4222
2019-07-03 09:20:18 +08:00
- PERMISSIONS_HOST=http://permissions
2019-02-18 03:27:42 +08:00
networks:
2019-02-20 02:00:59 +08:00
- traefiknet
2019-02-18 03:27:42 +08:00
- natsnet
2019-07-03 09:20:18 +08:00
- permissionsnet
2019-02-18 03:27:42 +08:00
store:
build: ./backend-store
tty: true
restart: unless-stopped
depends_on:
- nats
2019-02-18 23:44:25 +08:00
environment:
- NATS=nats://nats:4222
- DBPATH=/tmp/badger
2019-07-03 09:20:18 +08:00
- LISTEN=:80
- PERMISSIONS_HOST=http://permissions
2019-02-18 03:27:42 +08:00
networks:
- natsnet
2019-07-03 09:20:18 +08:00
- permissionsnet
2019-02-18 03:27:42 +08:00
transcription:
build: ./backend-transcription
tty: true
restart: unless-stopped
depends_on:
- nats
2019-02-18 23:44:25 +08:00
environment:
- NATS=nats://nats:4222
- API_KEY=AIzaSyDxSXDefzw9gXCQaVzOCYlRn_vcC9Da9Q0
2019-02-18 03:27:42 +08:00
networks:
- natsnet
2019-02-10 18:56:49 +08:00
networks:
2019-02-24 04:03:41 +08:00
authnet:
2019-02-10 18:56:49 +08:00
pgnet:
natsnet:
2019-02-18 03:27:42 +08:00
redisnet:
2019-02-20 02:00:59 +08:00
traefiknet:
2019-06-20 23:14:44 +08:00
minionet:
2019-06-23 04:57:47 +08:00
permissionsnet: