Files
swift-nio/docker/docker-compose.yaml
T
tomer doron 142ee43906 docker cleanup (#90)
Motivation:

repository currently contains two seperate docker definitions that are confusing to users

Modifications:

* remove Dockerfile.xenial so we have a canonical docker file for CI and developer testing
* point docker compose to canonical docker file
* define docker compose services for unit and integration tests. and make "test" service run both
* update readme

Result:

users are less confused about docker setup
2018-03-05 19:37:29 +09:00

59 lines
1.4 KiB
YAML

version: "3"
services:
swift-nio:
image: swift-nio:latest
build:
context: .
dockerfile: Dockerfile
unit-tests:
depends_on: [swift-nio]
image: swift-nio:latest
command: /bin/bash -cl "swift test"
volumes:
- ~/.ssh:/root/.ssh
- ..:/code
working_dir: /code
integration-tests:
depends_on: [swift-nio]
image: swift-nio:latest
command: /bin/bash -cl "./scripts/integration_tests.sh"
volumes:
- ~/.ssh:/root/.ssh
- ..:/code
working_dir: /code
test:
depends_on: [swift-nio]
image: swift-nio:latest
command: /bin/bash -cl "swift test && ./scripts/integration_tests.sh"
volumes:
- ~/.ssh:/root/.ssh
- ..:/code
working_dir: /code
echo:
depends_on: [swift-nio]
image: swift-nio:latest
ports:
- "9999:9999"
command: /bin/bash -cl "swift run NIOEchoServer 0.0.0.0 9999"
volumes:
- ~/.ssh:/root/.ssh
- ..:/code
working_dir: /code
http:
depends_on: [swift-nio]
image: swift-nio:latest
ports:
- "8888:8888"
command: /bin/bash -cl "swift run NIOHTTP1Server 0.0.0.0 8888"
volumes:
- ~/.ssh:/root/.ssh
- ..:/code
working_dir: /code