-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
36 lines (32 loc) · 1.2 KB
/
docker-compose.test.yaml
File metadata and controls
36 lines (32 loc) · 1.2 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
services:
# Test DB, Turn dev(or prod) DB off
db:
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${TEST_POSTGRES_USER} -d ${TEST_POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
volumes: # by changing volume we can turn the dev(or prod) DB off and turn test DB on: app-db-data -> test-db-data
- test-db-data:/var/lib/postgresql/data/pgdata
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PASSWORD=${TEST_POSTGRES_PASSWORD?Variable not set}
- POSTGRES_USER=${TEST_POSTGRES_USER?Variable not set}
- POSTGRES_DB=${TEST_POSTGRES_DB?Variable not set}
backend:
environment:
- POSTGRES_SERVER=db
- POSTGRES_PORT=${TEST_POSTGRES_PORT}
- POSTGRES_DB=${TEST_POSTGRES_DB}
- POSTGRES_USER=${TEST_POSTGRES_USER?Variable not set}
- POSTGRES_PASSWORD=${TEST_POSTGRES_PASSWORD?Variable not set}
eeve:
environment:
- POSTGRES_SERVER=db
- POSTGRES_PORT=${TEST_POSTGRES_PORT}
- POSTGRES_DB=${TEST_POSTGRES_DB}
- POSTGRES_USER=${TEST_POSTGRES_USER?Variable not set}
- POSTGRES_PASSWORD=${TEST_POSTGRES_PASSWORD?Variable not set}
volumes:
test-db-data: