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 named mounted volume
cannot ping linked docker container service
How to do variable substitution in env_file?
How to create stack in tutum with docker-compose.yml file?
ecs-cli docker compose version
dynamic link update in docker-compose
How to start arbitrarily many identical containers with docker-compose?
How to stop docker-compose run command
Unable to run sensu check in a docker-compose context
Should I use docker-compose start or docker-compose up -d
Docker Compose automatically setting links
docker compose volumes not contains files
Inheritance or nesting with docker compose
Reading docker-compose environment variables in application code
Docker Compose wait for container X before starting Y
docker-compose volumes not working this way

Categories

HOME
oop
kendo-ui-angular2
stata
sql-server-2014
domain-driven-design
fortran
process
apache-storm
boxplot
swap
schema
rmarkdown
minimax
theory
apache-httpclient-4.x
elastalert
suitecrm
derby
saucelabs
exchange-transport-agents
appsettings
web-worker
greensock
web-parts
windows-phone
gpo
project-structure
bootstrap-datetimepicker
git-branch
advertising
aws-certificate-manager
libxml2
boosting
typeorm
request-uri
fastadapter
sdl-2
kofax
latency
vertical-alignment
compiled-query
mtm
text-extraction
angular-fullstack
evaluation
openxava
sharpdevelop
wink
androiddesignsupport
totalview
reloaddata
nsalert
scrollmagic
qt3d
vertex-shader
zsh-completion
particle-system
qtruby
supervised-learning
shtml
radar-chart
jcalendar
wordpress-plugin
google-finance-api
jquery-draggable
github-for-mac
random-sample
traminer
pushwoosh
dcg
playn
waterline
pysvn
fedena
gnip
ios-enterprise
nest-initiative
triplestore
telerik-appbuilder
isl
visual-studio-setup-proje
cvi
starling-framework
code-complete
google-oauth-java-client
mandelbrot
usersettings
http-compression
pageload
auctex
quit
nsscrollview
mysql-connector
commonsware
idtabs
towerjs
xpolog
service-layer
xhtmlrenderer
noise-reduction
activescaffold
file-storage
cstring
cons

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