You can use environment variables in docker-compose.yml, e.g.
services:
api:
build: ${API_ROOT}
It'd be great to be able to use these in docker-sync.yml as well.
# WEB_ROOT is /Users/me/Development/web
syncs:
web-rsync:
src: "${WEB_ROOT}"
Doing that right now throws this error:
rsync: change_dir "/Users/me/Development/web//Users/me/Development/web" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1249) [sender=3.1.2]
Should it be able to use env vars now, or is that a feature request?
That would be a new feature, yet this is not implemented. I encourage you to try to contribute this, would be a great addition
My schedule's pretty jammed for the next few weeks, but maybe put a help wanted tag on this in case someone else wants to pick it up?
@greggilbert there is nobody with a non-jammed schedule :) Anything like docker-sync is "on top" - it does never really come out of real work, its a tool.
Anyway added flag, lets see if someone is interested. I will, as for most FR, close the FR after 1 month of inactivity to ensure we do not get a huge backlog of items nobody really cares about.
Thanks for the suggestion!
@EugenMayer @greggilbert - I'm willing to take a stab at it, since my dev team is heavily invested in docker-sync in our development environment on mac. I can't promise an exact timetable, but I'll keep this issue updated as I work on it.
Side-note: Having just gone through the release docs and github issues for Docker for Mac again, I just want to say great job at still having the best solution to the volume file i/o problems facing Docker for Mac! Each developer currently runs a Rails app and 3 Ember apps (each with full source in volumes) all at once with almost native-speed live-reloading thanks to docker-sync!
thanks for the kudos! Take your time and i am happy to review what you bring up, thank you!
@kbluescode any progress on this already? Thanks!
@EugenMayer sorry, life stuff came up last weekend and was just able to get the initial research done. I'll get going on my fork this weekend.
Great to hear! Looking forward to see what you can make up on this case.
@EugenMayer @kbluescode I took a stab at it, as well as my first time with Ruby code. Let me know how the PR can be improved.
big thanks at @vranac, this little baby just made its way to release/0.2.0 - be sure to use the branch if you test it, also see that example https://github.com/EugenMayer/docker-sync-boilerplate/tree/master/dynamic-configuration-dotnev and the docs https://github.com/EugenMayer/docker-sync/wiki/Variable-Replace---Dynamic-Configuration
That's awesome, guys. Thanks!