diff --git a/docker-compose.yml b/docker-compose.yml index 9996962..c8d30db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,4 +31,16 @@ services: depends_on: - postgres ports: - - 4000:4000 \ No newline at end of file + - 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 diff --git a/tests/.dockerignore b/tests/.dockerignore new file mode 100644 index 0000000..97aca2e --- /dev/null +++ b/tests/.dockerignore @@ -0,0 +1,2 @@ +.env +node_modules \ No newline at end of file diff --git a/tests/Dockerfile b/tests/Dockerfile new file mode 100644 index 0000000..09aebd9 --- /dev/null +++ b/tests/Dockerfile @@ -0,0 +1,11 @@ +FROM node:16.3.0-slim + +WORKDIR /srv + +COPY package* ./ + +RUN npm ci + +COPY . ./ + +CMD ["npm", "run", "test"] \ No newline at end of file