You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by an...@apache.org on 2019/11/23 10:12:35 UTC
[fineract-cn-docker-compose] 21/48: Update README and
docker-compose scripts for docker swarm deployment
This is an automated email from the ASF dual-hosted git repository.
angeh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fineract-cn-docker-compose.git
commit ecad80845258463b5842779e3ac6e28637ece440
Author: Anh3h <co...@gmail.com>
AuthorDate: Tue Oct 1 17:42:48 2019 -0400
Update README and docker-compose scripts for docker swarm deployment
---
README.md | 4 +-
docker-compose.yml | 78 ++++++++++++++++++++++++++++++++++++++-
external_tools/docker-compose.yml | 16 ++++++--
3 files changed, 92 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 847739e..775501d 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,7 @@ The first request will retrieve a token. The response should look like this, wit
```
If you don't get a token there is something wrong with your setup. The token is necessary for authentication in other requests thus be sure that this steps works.
-Important: Be sure to execute the requests in the right order!
+Important: Be sure to execute the requests in the right order!
The outcome is often stored in variables - check the Tests section of the requests.
Use the Postman Runner to import accounts in step 08.1.
@@ -168,6 +168,8 @@ docker volume rm external_tools_postgres-volume
docker-compose up
```
+## Note:
+**These scripts are ideal for a docker swarm deployment environment. If you are to deploy Fineract CN using Docker swarm you will have remove the network configuration from the docker-compose script and implement a load balancer (using docker swarm) that reflects the network configuratioin you just removed from the compose file.**
## TODO
diff --git a/docker-compose.yml b/docker-compose.yml
index a1e4bb5..750907e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -26,7 +26,7 @@ services:
deploy:
replicas: 1
restart_policy:
- condition: any
+ condition: on-failure
delay: 10s
max_attempts: 3
networks:
@@ -54,7 +54,7 @@ services:
deploy:
replicas: 1
restart_policy:
- condition: any
+ condition: on-failure
delay: 10s
max_attempts: 3
networks:
@@ -82,6 +82,8 @@ services:
replicas: 1
restart_policy:
condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -104,6 +106,12 @@ services:
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
system.privateKey.exponent: ${PRIVATE_KEY_EXPONENT}
system.privateKey.modulus: ${PRIVATE_KEY_MODULUS}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -124,6 +132,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -144,6 +158,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -166,6 +186,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -186,6 +212,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -206,6 +238,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -226,6 +264,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -246,6 +290,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -266,6 +316,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -286,6 +342,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -306,6 +368,12 @@ services:
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
@@ -315,6 +383,12 @@ services:
image: apache/fineract-cn-fims-web-app:latest
ports:
- "8888:8888"
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
networks:
external_tools_default:
fineract:
diff --git a/external_tools/docker-compose.yml b/external_tools/docker-compose.yml
index 010666d..67e2579 100644
--- a/external_tools/docker-compose.yml
+++ b/external_tools/docker-compose.yml
@@ -16,7 +16,7 @@ services:
deploy:
replicas: 1
restart_policy:
- condition: any
+ condition: on-failure
delay: 10s
max_attempts: 3
@@ -32,7 +32,7 @@ services:
deploy:
replicas: 1
restart_policy:
- condition: any
+ condition: on-failure
delay: 10s
max_attempts: 3
@@ -48,6 +48,16 @@ services:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
+ interval: 1m
+ retries: 5
+ deploy:
+ replicas: 1
+ restart_policy:
+ condition: on-failure
+ delay: 10s
+ max_attempts: 3
volumes:
- postgres-volume:/var/lib/postgresql/data
@@ -63,7 +73,7 @@ services:
deploy:
replicas: 1
restart_policy:
- condition: any
+ condition: on-failure
delay: 10s
max_attempts: 3
volumes: