-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
executable file
·46 lines (42 loc) · 975 Bytes
/
docker-compose.test.yml
File metadata and controls
executable file
·46 lines (42 loc) · 975 Bytes
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
version: '3.4'
services:
backend:
build:
context: .
target: test
dockerfile: Dockerfile
image: url-shortener:test
command: npm run test:ci
environment:
- NODE_ENV=test
- POSTGRES_HOST=postgres_test
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=url_shortener_test
- POSTGRES_PORT=5432
- REDIS_URL=redis://redis_test:6379/1
- URL_REDIRECT_DOMAIN=http://localhost:3000
ports:
- "3000:3000"
depends_on:
- postgres_test
- redis_test
postgres_test:
image: postgres:13.1
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=url_shortener_test
ports:
- "5432:5432"
volumes:
- postgres-volume-test:/var/lib/postgresql/data
redis_test:
image: redis:6.0
ports:
- "6379:6379"
volumes:
- redis-volume-test:/data
volumes:
postgres-volume-test:
redis-volume-test: