Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rexray example with secret #23

Merged
merged 3 commits into from
Sep 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions stack-rexray.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "3.7"

# 1. WORKAROUND: would prefer this use null network driver, will use bride for now to avoid overlay
# 1. WORKAROUND: would prefer this use null network driver, will use bridge for now to avoid overlay
# 2. TODO: would prefer on-failure restart_policy, but need to run this in script to look
# for if plugin exists first before reinstalling
# 3. TODO: would prefer this picks a driver version, and support driver updates
Expand All @@ -22,13 +22,21 @@ services:
- bridge
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: docker plugin install --grant-all-permissions rexray/dobs DOBS_REGION=nyc3 DOBS_TOKEN="${REXRAY_DO_TOKEN}" DOBS_CONVERTUNDERSCORES=true
# TODO: make token a secret
secrets:
- rexray_do_token
environment:
- REXRAY_DO_TOKEN_FILE=/run/secrets/rexray_do_token
command: sh -c "docker plugin install --grant-all-permissions rexray/dobs DOBS_REGION=nyc3 DOBS_TOKEN=$$(cat $$REXRAY_DO_TOKEN_FILE) DOBS_CONVERTUNDERSCORES=true"
deploy:
mode: global
restart_policy:
condition: none

secrets:
rexray_do_token:
external: true
name: rexray_do_token

networks:
bridge:
external: true
Expand Down