Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meltwater/kotlin-compose
Docker-compose wrapper for the JVM
https://github.com/meltwater/kotlin-compose
clientdata-no lifecycle-active purpose-library team-horace usage-internal
Last synced: about 2 months ago
JSON representation
Docker-compose wrapper for the JVM
- Host: GitHub
- URL: https://github.com/meltwater/kotlin-compose
- Owner: meltwater
- License: mit
- Created: 2016-09-26T09:13:07.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T13:36:27.000Z (8 months ago)
- Last Synced: 2024-06-15T00:12:56.194Z (7 months ago)
- Topics: clientdata-no, lifecycle-active, purpose-library, team-horace, usage-internal
- Language: Kotlin
- Homepage:
- Size: 233 KB
- Stars: 12
- Watchers: 158
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Overview
Kotlin-compose is a [docker-compose](https://docs.docker.com/compose/) wrapper for the JVM.
This library is mainly intended to be used in embedded integration tests.[![Build Status](https://travis-ci.org/meltwater/kotlin-compose.svg?branch=master)](https://travis-ci.org/meltwater/kotlin-compose)
[![jcenter](https://api.bintray.com/packages/meltwater/opensource/kotlin-compose/images/download.svg) ](https://bintray.com/meltwater/opensource/kotlin-compose/_latestVersion)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.meltwater.docker/kotlin-compose/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/com.meltwater.docker/kotlin-compose)## How to use it
### Dependencies
*Gradle:*
```groovy
repositories {
jcenter()
}
...dependencies {
compile 'com.meltwater.docker:kotlin-compose:$VERSION'
...
}
```
*Maven:*```xml
com.meltwater.docker
kotlin-compose
$VERSION
jar
```### Java code example
```java
// create the docker compose context giving a path to a docker compose yaml file, a machine uniqe prefix and
// optinally provide some ENVIRONMENT variables that will be resolved in the yaml file
Map env = new HashMap<>();
DockerCompose compose = new DockerCompose("docker-compose.yml", "uniqe-namespace", env);// start the docker containers (note this method will return as soon as all containers are running)
compose.up();// verify that all services inside the containers has started
// do your tests
// kill the containers (this method reurns when all containers has stopped)
compose.kill();
```For more examples have a look at [the unit tests](src/test)
### Building locally
./gradlew clean build
Install to your local .m2 directory:./gradlew clean build publishJavaArtifactsPublicationToMavenLocal
### Upload to jcenterNo new artifacts will be pushed to jcenter for the moment.
### Upload to Artifactory
Upload to Meltwater Artifactory repository:
./gradlew clean build artifactoryPublish
With the following settings given in ~/.gradle/gradle.properties
systemProp.artifactory_user=..
systemProp.artifactory_password=..### License
[MIT](LICENSE.txt)