-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
72 lines (66 loc) · 1.47 KB
/
docker-compose.yaml
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
version: '3.9'
services:
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
mongodb:
image: mongo:5.0
ports:
- 27017:27017
volumes:
- ~/url-shortener/data:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=S3cret
grpc:
restart: always
build:
dockerfile: Dockerfile.grpc
context: .
expose:
- "3001"
ports:
- "3001:3001"
stdin_open: true
tty: true
depends_on:
- mongodb
- cache
volumes:
- ~/url-shortener/cache:/src/_cache
environment:
PORT: 3001
MONGO_URI: mongodb://root:S3cret@mongodb:27017/?maxPoolSize=20&w=majority
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
server:
restart: always
build:
dockerfile: Dockerfile.rest
context: .
expose:
- "3000"
ports:
- "3000:3000"
stdin_open: true
tty: true
depends_on:
- mongodb
- cache
volumes:
- ~/url-shortener/cache:/src/_cache
environment:
PORT: 3000
MONGO_URI: mongodb://root:S3cret@mongodb:27017/?maxPoolSize=20&w=majority
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_PASSWORD: eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
cache:
driver: local