Skip to content

Commit 8165299

Browse files
committed
improve docker-compose usage
This commit moves more of the redis setup into the docker-compose file.
1 parent 741c955 commit 8165299

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ import:
77
- hapijs/ci-config-travis:env.yml@main
88

99
services:
10-
- redis
1110
- docker
1211

1312
before_script:
1413
- docker-compose up -d
15-
- redis-server --port 6378 --requirepass secret &
16-
- redis-server --port 6377 --unixsocket /tmp/redis.sock &
17-
- sleep 2
14+
- sleep 5

API.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,4 @@ The test suite expects:
8484
- a redis server listenning on socket `/tmp/redis.sock`
8585
- a redis cluster contains nodes running on ports 7000 to 7005
8686

87-
See [.travis.yml](./.travis.yml)
88-
89-
```sh
90-
docker-compose up -d
91-
redis-server &
92-
npm test
93-
```
87+
See [docker-compose.yml](./docker-compose.yml)

docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
version: '3.0'
22
services:
3+
redis_basic:
4+
container_name: redis_basic
5+
image: redis:6-alpine
6+
ports:
7+
- 6379:6379
8+
9+
redis_with_password:
10+
container_name: redis_with_password
11+
image: redis:6-alpine
12+
command: redis-server --requirepass secret
13+
ports:
14+
- 6378:6379
15+
16+
redis_with_uds:
17+
container_name: redis_with_uds
18+
image: redis:6-alpine
19+
command: redis-server --unixsocket /tmp/redis.sock
20+
volumes:
21+
- /tmp:/tmp
22+
323
redis_cluster:
424
container_name: redis_cluster
525
image: grokzen/redis-cluster:5.0.5

0 commit comments

Comments
 (0)