-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yml
41 lines (39 loc) · 934 Bytes
/
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
version: '3.8'
services:
hw_db_test:
image: postgres:12-alpine
container_name: hw_db_test
environment:
POSTGRES_DB: hw_db_test
POSTGRES_USER: hw_user
POSTGRES_PASSWORD: hw_password
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "hw_db_test", "-U", "hw_user" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
- './.docker_pgdata_test:/var/lib/postgresql/data'
ports:
- '5444:5432'
hm_test:
build:
context: .
working_dir: /app
command: npm run test
container_name: hm_test
depends_on:
hw_db_test:
condition: service_healthy
ports:
- '3050:3050'
environment:
PORT: 3050
DATABASE_PORT: 5432
DATABASE_HOST: hw_db_test
DATABASE_NAME: hw_db_test
DATABASE_USER: hw_user
DATABASE_ACCESS_KEY: hw_password
JWT_SECRET: secret_secret
volumes:
- ./:/app