|
@ -277,23 +277,23 @@ services: |
|
|
- $Wdir/project:/home/docker/project |
|
|
- $Wdir/project:/home/docker/project |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
workerservice: |
|
|
# workerservice: |
|
|
image: $IMAGE_NAME |
|
|
# image: $IMAGE_NAME |
|
|
privileged: true |
|
|
# privileged: true |
|
|
environment: |
|
|
# environment: |
|
|
- NODENAME=${NODENAME} |
|
|
# - NODENAME=${NODENAME} |
|
|
- NODENETWORK=${NODENETWORK} |
|
|
# - NODENETWORK=${NODENETWORK} |
|
|
- DISPLAY=\${DISPLAY} |
|
|
# - DISPLAY=\${DISPLAY} |
|
|
cap_add: |
|
|
# cap_add: |
|
|
- NET_ADMIN |
|
|
# - NET_ADMIN |
|
|
user: root |
|
|
# user: root |
|
|
entrypoint: ["sec_bootstrap", "role=workerservice", "sec_master_service_name=masterservice", "sec_worker_service_name=workerservice"] |
|
|
# entrypoint: ["sec_bootstrap", "role=workerservice", "sec_master_service_name=masterservice", "sec_worker_service_name=workerservice"] |
|
|
#ports: |
|
|
# #ports: |
|
|
# - "\${SSH_PORT}:22" |
|
|
# # - "\${SSH_PORT}:22" |
|
|
networks: |
|
|
# networks: |
|
|
- ${HYBRID_NETWORK} |
|
|
# - ${HYBRID_NETWORK} |
|
|
volumes: |
|
|
# volumes: |
|
|
- $Wdir/project:/home/docker/project |
|
|
# - $Wdir/project:/home/docker/project |
|
|
|
|
|
|
|
|
networks: |
|
|
networks: |
|
|
${HYBRID_NETWORK}: |
|
|
${HYBRID_NETWORK}: |
|
@ -465,9 +465,18 @@ up_master () |
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
printf "\\n%s\\n" "$HEADER" |
|
|
echo "$ docker-compose up -d masterservice" |
|
|
echo "$ docker-compose up -d masterservice" |
|
|
printf "\\n" |
|
|
printf "\\n" |
|
|
docker-compose rm -f |
|
|
#docker-compose rm -f |
|
|
docker-compose up --build -d masterservice |
|
|
#docker-compose up --build -d masterservice |
|
|
#docker-compose up --force-recreate -d masterservice |
|
|
#docker-compose up --force-recreate -d masterservice |
|
|
|
|
|
|
|
|
|
|
|
docker-compose rm -f -s -v |
|
|
|
|
|
docker pull $IMAGE_NAME |
|
|
|
|
|
docker-compose up --build --remove-orphans -d masterservice << ANSWERS |
|
|
|
|
|
yes |
|
|
|
|
|
yes |
|
|
|
|
|
yes |
|
|
|
|
|
ANSWERS |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -646,7 +655,7 @@ if [ $COMMAND_UP -eq 1 ]; then |
|
|
generate_ssh_keys |
|
|
generate_ssh_keys |
|
|
build_and_push_image # remove for microservices |
|
|
build_and_push_image # remove for microservices |
|
|
up_master |
|
|
up_master |
|
|
up_workers |
|
|
#up_workers |
|
|
|
|
|
|
|
|
prompt_ready |
|
|
prompt_ready |
|
|
show_instruction |
|
|
show_instruction |
|
@ -667,7 +676,7 @@ elif [ $COMMAND_SCALE -eq 1 ]; then |
|
|
down_master |
|
|
down_master |
|
|
down_workers |
|
|
down_workers |
|
|
up_master |
|
|
up_master |
|
|
up_workers |
|
|
#up_workers |
|
|
|
|
|
|
|
|
prompt_ready |
|
|
prompt_ready |
|
|
show_instruction |
|
|
show_instruction |
|
@ -678,7 +687,7 @@ elif [ $COMMAND_RELOAD -eq 1 ]; then |
|
|
down_workers |
|
|
down_workers |
|
|
build_and_push_image |
|
|
build_and_push_image |
|
|
up_master |
|
|
up_master |
|
|
up_workers |
|
|
#up_workers |
|
|
|
|
|
|
|
|
prompt_ready |
|
|
prompt_ready |
|
|
show_instruction |
|
|
show_instruction |
|
|