Skip to content

Commit

Permalink
Use docker compose v2 (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipliu committed Aug 5, 2024
1 parent 0d81cff commit 6d0f746
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sub_essential_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
- name: Pull Stellar Validation Tests Docker Image
run: docker pull stellar/anchor-tests:latest &

- name: Run Kafka, Postgres, and Sep24 UI with docker-compose
- name: Run Kafka, Postgres, and Sep24 UI with docker compose
env:
TEST_PROFILE_NAME: default
run: docker-compose -f /home/runner/java-stellar-anchor-sdk/service-runner/src/main/resources/docker-compose-test.yaml up -d --build
run: docker compose -f /home/runner/java-stellar-anchor-sdk/service-runner/src/main/resources/docker-compose-test.yaml up -d --build

- name: Run sep server, platform server, observer, and reference servers for integration tests
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sub_extended_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
#############################################

- name: Run Kafka, Postgres, and Sep24 UI with docker-compose
run: docker-compose -f /home/runner/java-stellar-anchor-sdk/service-runner/src/main/resources/docker-compose-test.yaml up -d --build
- name: Run Kafka, Postgres, and Sep24 UI with docker compose
run: docker compose -f /home/runner/java-stellar-anchor-sdk/service-runner/src/main/resources/docker-compose-test.yaml up -d --build

# `custody` Tests
- name: Start `custody` configuration
Expand Down
12 changes: 6 additions & 6 deletions docs/01 - Contributing/A - Development Environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* [Clean](#clean)
* [Build](#build)
* [Running Unit Tests](#running-unit-tests)
* [Running `docker-compose` up for development](#running-docker-compose-up-for-development)
* [Running `docker compose` up for development](#running-docker-compose-up-for-development)
* [Starting all servers](#starting-all-servers)
* [Set up the Git Hooks](#set-up-the-git-hooks)
* [Set up the Development Environment with IntelliJ IDEA](#set-up-the-development-environment-with-intellij-idea)
Expand Down Expand Up @@ -111,11 +111,11 @@ Run all tests: `./gradlew test`

Run subproject tests: `./gradlew :[subproject]:test`

### Running `docker-compose start` for Kafka, Postgres, and SEP24 Reference UI
### Running `docker compose start` for Kafka, Postgres, and SEP24 Reference UI

`./gradlew dockerComposeStart`

### Running `docker-compose stop` to shutdown Kafka, Postgres, and SEP24 Reference UI
### Running `docker compose stop` to shutdown Kafka, Postgres, and SEP24 Reference UI

`./gradlew dockerComposeStop`

Expand Down Expand Up @@ -218,7 +218,7 @@ the `service-runner/src/main/resources/profiles` folder.
If you would like to debug the Platform server, you can do so by running the
- Make sure `docker` and `docker-compose` is available on your local machine.
- Make sure `docker` is available on your local machine.
- Check if there are previous docker containers running on your machine. If there are, please stop and delete them.
- Run `Docker - Run Dev Stack - Kafka, Postgres, SEP24 Reference UI` to start the development stack.
- Debug `Sep Server: default` to start the SEP server.
Expand All @@ -229,15 +229,15 @@ If you would like to debug the unit tests or the end-to-end tests, there are two
#### Option 1: Run the servers from IntelliJ
- Make sure `docker` and `docker-compose` is available on your local machine.
- Make sure `docker` is available on your local machine.
- Check if there are previous docker containers running on your machine. If there are, please stop and delete them.
- Run `Docker - Run Dev Stack - Kafka, Postgres, SEP24 Reference UI` to start the development stack.
- Run `Test Profile: default` to run the servers with the `default` profile.
- Debug the tests you want to run with the IntelliJ debugger.
### Option 2: Run the servers and tests from Gradle
- Make sure `docker` and `docker-compose` is available on your local machine.
- Make sure `docker` is available on your local machine.
- Check if there are previous docker containers running on your machine. If there are, please stop and delete them.
- Navigate to the directory to the project folder
- `./gradlew dockerComposeStart` to start the development stack.
Expand Down
4 changes: 2 additions & 2 deletions service-runner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ tasks.register<JavaExec>("startServersWithTestProfile") {
mainClass.set("org.stellar.anchor.platform.run_profiles.RunTestProfile")
}

/** Run docker-compose up to start Postgres, Kafka, etc. */
/** Run docker compose up to start Postgres, Kafka, etc. */
tasks.register<JavaExec>("dockerComposeStart") {
println("Running docker-compose to start Postgres, Kafka ,etc.")
println("Running docker compose to start Postgres, Kafka ,etc.")
group = "application"
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("org.stellar.anchor.platform.run_profiles.RunDockerDevStackNoWait")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.stellar.anchor.platform.*
fun main() = runBlocking {
testProfileExecutor = TestProfileExecutor(TestConfig())
// The "registerShutdownHook(testProfileExecutor)" is commented out to avoid shutting down the
// docker-compose stack when the JVM is shutdown.
// docker compose stack when the JVM is shutdown.
testProfileExecutor.start(true) {
it.env[RUN_DOCKER] = "true"
it.env[RUN_ALL_SERVERS] = "false"
Expand Down

0 comments on commit 6d0f746

Please sign in to comment.