Files
swift-aws-lambda-runtime/docker/docker-compose.yaml
T
tomer doron d956b89dbc improve debugging example (#84)
motivation: clearer examples as we prepare to open source

changes:
* rename debugging example to make the name more accurate
* add more information in the local debugging example
* add a Shared module to show how to share code between client and server
* make example more useful - use JSON for registration like flow
* add docker-compose task to test examples

Co-authored-by: Yim Lee <yim_lee@apple.com>
2020-05-21 09:07:38 -07:00

45 lines
1.0 KiB
YAML

# this file is not designed to be run directly
# instead, use the docker-compose.<os>.<swift> files
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.1804.52.yaml run test
version: "3"
services:
runtime-setup:
image: swift-aws-lambda:default
build:
context: .
dockerfile: Dockerfile
common: &common
image: swift-aws-lambda:default
depends_on: [runtime-setup]
volumes:
- ~/.ssh:/root/.ssh
- ..:/code:z
working_dir: /code
cap_drop:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
sanity:
<<: *common
command: /bin/bash -cl "./scripts/sanity.sh"
test:
<<: *common
command: /bin/bash -cl "swift test --enable-test-discovery -Xswiftc -warnings-as-errors $${SANITIZER_ARG-}"
test-samples:
<<: *common
command: >-
/bin/bash -clx "
swift build --package-path Examples/LambdaFunctions &&
swift build --package-path Examples/LocalDebugging/MyLambda"
# util
shell:
<<: *common
entrypoint: /bin/bash