Added docker-compose.yml for running services and mongodb
Removed bogus dependencies on mongo
This commit is contained in:
56
docker-compose.yml
Normal file
56
docker-compose.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
accountscommandside:
|
||||||
|
image: java:8
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./accounts-command-side-service/build/libs:/app
|
||||||
|
command: java -jar /app/accounts-command-side-service.jar
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
EVENT_STORE_USER_ID:
|
||||||
|
EVENT_STORE_PASSWORD:
|
||||||
|
EVENT_STORE_URL:
|
||||||
|
EVENT_STORE_STOMP_SERVER_HOST:
|
||||||
|
EVENT_STORE_STOMP_SERVER_PORT:
|
||||||
|
|
||||||
|
transactionscommandside:
|
||||||
|
image: java:8
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./transactions-command-side-service/build/libs:/app
|
||||||
|
command: java -jar /app/transactions-command-side-service.jar
|
||||||
|
ports:
|
||||||
|
- "8082:8080"
|
||||||
|
environment:
|
||||||
|
EVENT_STORE_USER_ID:
|
||||||
|
EVENT_STORE_PASSWORD:
|
||||||
|
EVENT_STORE_URL:
|
||||||
|
EVENT_STORE_STOMP_SERVER_HOST:
|
||||||
|
EVENT_STORE_STOMP_SERVER_PORT:
|
||||||
|
|
||||||
|
|
||||||
|
accountsqueryside:
|
||||||
|
image: java:8
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ./accounts-query-side-service/build/libs:/app
|
||||||
|
command: java -jar /app/accounts-query-side-service.jar --spring.data.mongodb_uri=mongodb://database/CQRS
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
|
links:
|
||||||
|
- mongodb
|
||||||
|
environment:
|
||||||
|
EVENT_STORE_USER_ID:
|
||||||
|
EVENT_STORE_PASSWORD:
|
||||||
|
EVENT_STORE_URL:
|
||||||
|
EVENT_STORE_STOMP_SERVER_HOST:
|
||||||
|
EVENT_STORE_STOMP_SERVER_PORT:
|
||||||
|
SPRING_DATA_MONGODB_URI: mongodb://mongodb/mydb
|
||||||
|
|
||||||
|
mongodb:
|
||||||
|
image: mongo:latest
|
||||||
|
hostname: mongodb
|
||||||
|
command: mongod --smallfiles
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
|
||||||
@@ -4,7 +4,6 @@ dependencies {
|
|||||||
|
|
||||||
compile project(":common-backend")
|
compile project(":common-backend")
|
||||||
compile "net.chrisrichardson.eventstore.client:eventstore-java-client:$eventStoreClientVersion"
|
compile "net.chrisrichardson.eventstore.client:eventstore-java-client:$eventStoreClientVersion"
|
||||||
compile "org.springframework.boot:spring-boot-starter-data-mongodb:$springBootVersion"
|
|
||||||
|
|
||||||
compile 'com.fasterxml.jackson.core:jackson-core:2.4.3'
|
compile 'com.fasterxml.jackson.core:jackson-core:2.4.3'
|
||||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ dependencies {
|
|||||||
|
|
||||||
compile project(":common-backend")
|
compile project(":common-backend")
|
||||||
compile "net.chrisrichardson.eventstore.client:eventstore-java-client:$eventStoreClientVersion"
|
compile "net.chrisrichardson.eventstore.client:eventstore-java-client:$eventStoreClientVersion"
|
||||||
compile "org.springframework.boot:spring-boot-starter-data-mongodb:$springBootVersion"
|
|
||||||
|
|
||||||
compile 'com.fasterxml.jackson.core:jackson-core:2.4.3'
|
compile 'com.fasterxml.jackson.core:jackson-core:2.4.3'
|
||||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
|
||||||
|
|||||||
9
wait-for-docker-services.sh
Executable file
9
wait-for-docker-services.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
while [[ true ]]; do
|
||||||
|
nc -z -w 4 ${SERVICE_HOST?} 8080 && nc -z -w 4 ${SERVICE_HOST?} 8081 && nc -z -w 4 ${SERVICE_HOST?} 8082
|
||||||
|
if [[ "$?" -eq "0" ]]; then
|
||||||
|
echo connected
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo -n .
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user