Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beiertu-mms/wiremock-docker
Using wiremock with docker compose.
https://github.com/beiertu-mms/wiremock-docker
docker docker-compose gradle kotlin wiremock
Last synced: about 2 months ago
JSON representation
Using wiremock with docker compose.
- Host: GitHub
- URL: https://github.com/beiertu-mms/wiremock-docker
- Owner: beiertu-mms
- License: mit
- Created: 2022-12-22T18:14:11.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T16:26:35.000Z (9 months ago)
- Last Synced: 2024-04-08T20:17:15.525Z (9 months ago)
- Topics: docker, docker-compose, gradle, kotlin, wiremock
- Language: Kotlin
- Homepage:
- Size: 174 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Wiremock in docker compose
[![license](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
[![CI](https://github.com/beiertu-mms/wiremock-docker/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/beiertu-mms/wiremock-docker/actions/workflows/ci.yaml)Start an instance of [wiremock](https://wiremock.org/) using [docker compose](https://docs.docker.com/compose/).
## Usage
Via [docker-compose](https://docs.docker.com/compose/)
```sh
docker-compose up
```or the new [compose command](https://docs.docker.com/compose/reference/)
```sh
docker compose up
```## Wiremock Mappings
Add your mappings json files under `wiremock/mappings` and any response payload under `wiremock/__files`.
If mappings or payload are changed, the container will need to be restarted.```sh
docker compose restart
```For example mappings, see [hello.json](./wiremock/mappings/hello.json) and [general.json](./wiremock/mappings/general.json).
And their referenced response payload [hello.json response](./wiremock/__files/hello.json) and [not-found](./wiremock/__files/not-found.json).For more information about the mappings, see the [Wiremock documentation](https://wiremock.org/docs/stubbing/).
## Mapping Creation
To create new request mapping, the [main function in App.kt](./mock-api/src/main/kotlin/de/beiertu/wiremock/docker/App.kt)
in [mock-api](./mock-api) can be used.