docker-compose


Passing arguments to docker compose file when using it for swarm


I have a docker swarm and I deploy my service stack using
"docker stack deploy --compose-file mycompose.yaml myservice".
I want to pass some values that will be using in this yaml file. Can I pass it from command line or through some other way?
With the old docker-compose you could create an .env file and expose environmental variables to the containers that way. Referencing ${env} in the .yml file. It seems swarm does something similar, not sure about the .env file tho. I'm still working on getting a swarm setup so I'm stuck on compose for now. I found these but haven't tried it myself yet, good luck.
https://docs.docker.com/compose/environment-variables/
And this too!
https://docs.docker.com/engine/swarm/secrets/

Related Links

Docker compose to always deploy using latest image
JHipster - Doubts in the development using Microservices Architecture
Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file

Categories

HOME
classification
youtube-api
model-view-controller
stanford-nlp
postgresql-9.3
mysqli
xamarin.forms
crm
spss
arguments
css-selectors
angularjs-directive
atlassian-fisheye
autocad
hibernate-mapping
schema
jquery-select2
clip-path
sahi
coding-style
osrm
chef-recipe
aggregate
appsettings
aiml
single-page-application
combinations
google-drive-android-api
inspec
rollupjs
gulp-jshint
mex
kundera
vtd-xml
multilanguage
jql
kubectl
visual-prolog
circle
favorites
node-soap
angularjs-resource
leaderboard
hippocms
stencyl
queryover
susy
test-kitchen
codepen
reqif
jks
emacs24
flask-socketio
openxava
visio-2010
gige-sdk
dmalloc
overhead
scrollmagic
addressbook
scikit-image
mate-desktop
sprockets
paypal-subscriptions
containstable
apache2-module
markerspiderfier
jquery-draggable
yfiles
app-data
recode
page-flipping
playn
conkeror
quickfixn
pysvn
system.io.packaging
nsurlrequest
nsnotificationcenter
im4java
switchpreference
jsmpp
email-headers
dayofweek
android-jack-and-jill
mahara
ia-32
nokogiri
listpicker
leap-year
azure-scheduler
dd4t
latex-suite
pymel
urlfetch
django-tinymce
junit-rule
wpml
django-admin-tools
animationdrawable
inserthtml
fileoutputstream
mcpd
cherokee
xpolog
code-golf
pixel-bender
vista64
cons
urlscan
paperless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App