Skip to content

Commit

Permalink
Removing use of local ENV for Redis password (and example for it in
Browse files Browse the repository at this point in the history
example.env), now deprecated by recently created Docker Secret, and
updating main docker-deploy.yml to have myredis service config change
to the new convention.
  • Loading branch information
robertbartel committed Feb 11, 2020
1 parent 25bf4e5 commit 4a50d4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions docker/main/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ services:
requests-net:
aliases:
- ${DOCKER_REDIS_SERVICE_ALIAS:-redis}
entrypoint: ['redis-server', '/usr/local/etc/redis/redis.conf', '--requirepass', "${DOCKER_REDIS_PASS?}"]
entrypoint: "/entrypoint.sh"
volumes:
- ./myredis/entrypoint.sh:/entrypoint.sh
- ./myredis/redis.conf:/usr/local/etc/redis/redis.conf
deploy:
placement:
constraints:
- ${DOCKER_MPIMASTER_DEPLOY_CONSTRAINT_1:--node.role==manager}
- ${DOCKER_MPIMASTER_DEPLOY_CONSTRAINT_2:-node.id!=notrealid_tautology_by_default}
secrets:
- myredis_pass
environment:
# Used by the entrypoint.sh script
- DOCKER_SECRET_REDIS_PASS=myredis_pass
request-service:
image: ${DOCKER_INTERNAL_REGISTRY:?}/nwm-request-service
networks:
Expand All @@ -60,7 +66,6 @@ services:
- REDIS_HOST=${DOCKER_REDIS_SERVICE_ALIAS:-redis}
#- REDIS_PORT=
#- REDIS_USER=
- REDIS_PASS=${DOCKER_REDIS_PASS?}
- LISTEN_PORT=${DOCKER_REQUESTS_CONTAINER_PORT:-3012}
- SERVICE_PACKAGE_NAME=${PYTHON_PACKAGE_NAME_REQUEST_SERVICE:?}
- SERVICE_SSL_DIR=${DOCKER_REQUESTS_CONTAINER_SERVICE_SSL_DIR:-/ssl}
Expand Down
3 changes: 1 addition & 2 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,4 @@ DOCKER_GUI_MAAS_ENDPOINT_HOST=nwm-master_request-service

## The stack-internal hostname alias for the Redis service
DOCKER_REDIS_SERVICE_ALIAS=redis
## The password value for authenticated communication with the stack Redis service
#DOCKER_REDIS_PASS=
## Note that the password value for the Redis service is now managed using a Docker Secret.

0 comments on commit 4a50d4f

Please sign in to comment.