This repository was archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
53 lines (49 loc) · 1.58 KB
/
docker-compose.ci.yml
File metadata and controls
53 lines (49 loc) · 1.58 KB
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
version: '2.4'
# Contains a tests runner container that is used to run the full test suite for
# the service against the test containers from `docker-compose.test.yml`.
services:
test-postgres:
image: postgres:12.7
healthcheck:
test: pg_isready -h 127.0.0.1 -d test_db -U test_user
interval: 5s
start_period: 1s
restart: always
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
# In CI use the image that was already built for running unit tests
test-node-service-prototype:
image: crystal-ball/node-service-prototype:prod
healthcheck:
# Slow down start period and back off interval for service container when
# testing to minimize log noise from healthcheck endpoint
start_period: 5s
interval: 30s
environment:
SERVICE_HOST: '0.0.0.0'
SERVICE_PORT: 9000
POSTGRES_HOST: test-postgres
POSTGRES_PORT: 5432
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DATABASE: test_db
depends_on:
test-postgres:
condition: service_healthy
tests-runner:
image: crystal-ball/node-service-prototype:tests-runner
volumes:
- ./migrations:/opt/service/migrations
environment:
SERVICE_HOST: test-node-service-prototype
SERVICE_PORT: 9000
POSTGRES_HOST: test-postgres
POSTGRES_PORT: 5432
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DATABASE: test_db
depends_on:
test-node-service-prototype:
condition: service_healthy