-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
37 lines (37 loc) · 1.08 KB
/
docker-compose.test.yml
File metadata and controls
37 lines (37 loc) · 1.08 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
version: '3'
services:
drivent-postgres-test:
image: postgres:13-alpine
environment:
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DATABASE}
DATABASE_URL: ${DATABASE_URL}
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
volumes:
- ~/data/drivent/postgres-test:/var/lib/postgresql/data
command: postgres -p ${POSTGRES_PORT}
drivent-test:
build:
context: .
dockerfile: Dockerfile.test
container_name: drivent-test
depends_on:
- drivent-postgres-test
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '5'
working_dir: /usr/src/drivent
command: bash -c "npm run test:migration:run && npm test"
environment:
NODE_ENV: test
POSTGRES_USERNAME: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_DATABASE: ${POSTGRES_DATABASE}
POSTGRES_PORT: ${POSTGRES_PORT}
DATABASE_URL: ${DATABASE_URL}
JWT_SECRET: ${JWT_SECRET}