-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (76 loc) · 1.95 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '2'
networks:
redis-caching:
services:
golang:
image: golang:1.10.1-alpine
networks:
redis-caching:
depends_on:
- redis
ports:
- "80:5000"
volumes:
- ./vendor/src/github.com:/usr/local/go/src/github.com
- .:/go/src/redis-cache
working_dir: /go/src/redis-cache
command: sh ./run-cache-tests.sh
links:
- redis
environment:
REDIS: 'redis-backend:6379'
EXPIRY_TIME: 5000
CACHE_SIZE: 50
PORT: '5000'
TYPE: 'http'
golang-http:
image: golang:1.10.1-alpine
networks:
redis-caching:
depends_on:
- golang-tcp
ports:
- "80:5000"
volumes:
- ./vendor/src/github.com:/usr/local/go/src/github.com
- .:/go/src/redis-cache
working_dir: /go/src/redis-cache
command: ./redis_lru_cache
links:
- redis
environment:
REDIS: 'golang-tcp:7001'
EXPIRY_TIME: 5000
CACHE_SIZE: 50
PORT: '5000'
TYPE: 'http'
golang-tcp:
image: golang:1.10.1-alpine
networks:
redis-caching:
depends_on:
- redis
ports:
- "7001:7001"
volumes:
- ./vendor/src/github.com:/usr/local/go/src/github.com
- .:/go/src/redis-cache
working_dir: /go/src/redis-cache
command: ./redis_lru_cache
links:
- redis
environment:
REDIS: 'redis-backend:6379'
EXPIRY_TIME: 5000
CACHE_SIZE: 50
PORT: '7001'
TYPE: 'tcp'
redis:
image: redis:4.0.9-alpine
networks:
redis-caching:
aliases:
- redis-backend
restart: unless-stopped
ports:
- "6379:6379"