Add docker-compose file for executing tests

Signed-off-by: Maximilian Seifert <max.seifert@drglitch.net>
This commit is contained in:
Maximilian Seifert 2019-03-25 19:30:31 +01:00
parent c1f8890f8d
commit 6147c72663
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,37 @@
version: "3.4"
services:
monolith_test:
container_name: dendrite_monolith_test
hostname: monolith
entrypoint: ["bash", "./docker/test/monolith.sh"]
build: ./
volumes:
- ..:/build
- ./build/pkg:/build/pkg
- ./build/bin:/build/bin
networks:
- internal
depends_on:
- postgres
ports:
- "8008:8008"
- "8448:8448"
postgres:
container_name: dendrite_postgres
hostname: postgres
image: postgres:9.5
restart: always
volumes:
- ./postgres/create_db.sh:/docker-entrypoint-initdb.d/20-create_db.sh
environment:
POSTGRES_PASSWORD: itsasecret
POSTGRES_USER: dendrite
networks:
- internal
ports:
- 15432:5432
networks:
internal:
attachable: true

6
docker/test/monolith.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/bash
rm -rf build
bash ./docker/build.sh
gb test