-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
52 lines (51 loc) · 1.19 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
version: '3.9'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: zHomeMedia
volumes:
- ./initdb:/docker-entrypoint-initdb.d
redis:
image: "redis:alpine"
api:
build: .
image: zhomemedia-api
environment:
DEVELOPMENT: "false"
MONGO_HOST: mongo
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
REDIS_SERVER: redis
STORAGE: /storage
LOG_LEVEL: ${LOG_LEVEL}
volumes:
- ${STORAGE}:/storage
command: yarn start
ports:
- ${PORT}:${PORT}
depends_on:
- mongo
- redis
api-tests:
build: .
image: zhomemedia-api
environment:
DEVELOPMENT: "true"
MONGO_HOST: mongo
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
REDIS_SERVER: redis
STORAGE: /storage
LOG_LEVEL: ${LOG_LEVEL}
volumes:
- ./coverage:/~/zhomemedia/coverage
command: dockerize
-wait tcp://mongo:27017 -wait tcp://redis:6379 -timeout 10s
sh -c "yarn test"
depends_on:
- mongo
- redis