-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.test.yml
100 lines (93 loc) · 2.21 KB
/
docker-compose.test.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
services:
stripe-test:
container_name: blackbird-stripe-mock-test
image: stripe/stripe-mock
networks: !reset [test-network]
ports: !reset []
profiles: [test]
redis-test:
extends:
file: docker-compose.api.yml
service: redis
container_name: blackbird-redis-test
networks: !reset [test-network]
ports: !reset []
profiles: [test]
api-test:
extends:
file: docker-compose.api.yml
service: api
container_name: blackbird-api-test
networks: !reset [test-network]
links:
- redis-test:redis
- minio-test:minio
- pgsql-test:pgsql
ports: !reset []
depends_on: !reset
- redis-test
- pgsql-test
- minio-test
- stripe-test
environment:
NODE_ENV: test
API_DOMAIN: http://api:3000
STRIPE_HOST: stripe-test
STRIPE_PORT: 12111
STRIPE_PROTOCOL: http
STRIPE_KEY: sk_test_123
profiles: [test]
minio-test:
extends:
file: docker-compose.api.yml
service: minio
container_name: blackbird-minio-test
networks: !reset [test-network]
ports: !reset []
volumes: !reset
- minio_storage-test:/data
profiles: [test]
pgsql-test:
extends:
file: docker-compose.api.yml
service: pgsql
container_name: blackbird-pgsql-test
networks: !reset [test-network]
ports: !reset []
volumes: !reset
- ./data/pgsql-test:/var/lib/postgresql/data
- ./data/pgsql_backups-test:/backups
profiles: [test]
test:
extends:
file: docker-compose.api.yml
service: api
container_name: blackbird-test
networks: !reset [test-network]
links:
- redis-test:redis
- api-test:api
- minio-test:minio
- pgsql-test:pgsql
- stripe-test:stripe
ports: !reset []
depends_on: !reset
api-test:
condition: service_healthy
environment:
NODE_ENV: test
CI: "${CI:-false}"
API_DOMAIN: http://api:3000
command: yarn api:test
restart: no
profiles: [test]
develop:
watch:
- action: sync+restart
path: ./test
target: /var/www/api/test
networks:
test-network:
driver: bridge
volumes:
minio_storage-test: {}