-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
67 lines (61 loc) · 1.67 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
version: '3'
services:
gateway:
build: .
privileged: true
ports:
- "8080:8080"
networks:
- redis-net
links:
- "rate-limiter:rate-limiter"
environment:
- API_URL=http://rate-limiter:8085
rate-limiter:
build: ./golang-redis-rate-limiter
privileged: true
ports:
- "8085:8085"
networks:
- redis-net
volumes:
- ./golang-redis-rate-limiter/app/init.go:/go/src/github.com/shredx/golang-redis-rate-limiter/app/init.go
- ./golang-redis-rate-limiter/app/models:/go/src/github.com/shredx/golang-redis-rate-limiter/app/models
- ./golang-redis-rate-limiter/app/controllers:/go/src/github.com/shredx/golang-redis-rate-limiter/app/controllers
- ./golang-redis-rate-limiter/app/views:/go/src/github.com/shredx/golang-redis-rate-limiter/app/views
- ./golang-redis-rate-limiter/conf:/go/src/github.com/shredx/golang-redis-rate-limiter/conf
node-token-generator:
build: ./node-redis-rate-limiter
privileged: true
ports:
- "9090:9090"
networks:
- redis-net
links:
- redis:redis
environment:
- REDIS_URL=redis://redis:6379
- PORT=9090
- TOKEN_SECRET=well-its-not-that-secure
- ACCESS_TOKEN_EXPIRY=10h
- ACCESS_TOKEN_ALGO=HS256
- REFRESH_TOKEN_EXPIRY=9h
- REFRESH_TOKEN_ALGO=HS256
redis:
hostname: redis
image: redis
networks:
- redis-net
nginx:
build: ./final-build
links:
- "rate-limiter:rate-limiter"
- "gateway:api-gateway"
- "node-token-generator:token-generator"
ports:
- "8081:80"
networks:
- redis-net
networks:
redis-net:
driver: bridge