-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
50 lines (47 loc) · 1.44 KB
/
docker-compose.yaml
File metadata and controls
50 lines (47 loc) · 1.44 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
services:
postgres:
build:
context: .
dockerfile: docker/postgres/Dockerfile
volumes:
- 'postgres:/var/lib/postgresql'
ports:
- '5432:5432'
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
healthcheck:
test:
- CMD-SHELL
- |
sh -c "pg_isready -d '
sslmode=verify-full
sslrootcert=/var/lib/postgresql/ca.crt
sslcert=/var/lib/postgresql/server.crt
sslkey=/var/lib/postgresql/server.key
user=$${POSTGRES_USER}
password=$${POSTGRES_PASSWORD}
dbname=$${POSTGRES_DB}
'"
interval: 1s
timeout: 5s
retries: 10
test:
build:
context: .
dockerfile: docker/tests/Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_CA_CERT_PATH: /app/docker/postgres/certificates/ca.pem
volumes:
- .:/app
working_dir: /app
command: ["swift", "test", "--parallel", "--enable-code-coverage"]
volumes:
postgres: