Added tests to docker-compose

This commit is contained in:
Lilleman auf Larv 2021-06-23 22:59:27 +02:00
parent 9ba1c8d736
commit 2f5a7918d2
3 changed files with 26 additions and 1 deletions

View File

@ -32,3 +32,15 @@ services:
- postgres - postgres
ports: ports:
- 4000:4000 - 4000:4000
tests:
build:
context: tests
environment:
- ADMIN_API_KEY=hihi
- AUTH_URL=http://auth:4000
- JWT_SHARED_SECRET=hihi
profiles: ["tests"]
depends_on:
- auth
#command: ls -l

2
tests/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
.env
node_modules

11
tests/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:16.3.0-slim
WORKDIR /srv
COPY package* ./
RUN npm ci
COPY . ./
CMD ["npm", "run", "test"]