Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
52 lines (49 loc) · 1.57 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
52 lines (49 loc) · 1.57 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
services:
postgres:
build:
context: .
dockerfile: docker/postgres/Dockerfile
volumes:
- 'postgres:/var/lib/postgresql'
ports:
- '${POSTGRES_PORT_FORWARD:-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
args:
SWIFT_VERSION: ${SWIFT_VERSION:-6.3}
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", "--build-path", "/tmp/swift-build", "--parallel", "--enable-code-coverage"]
volumes:
postgres: