damp icon indicating copy to clipboard operation
damp copied to clipboard

Extend functionality

Open mathewpeterson opened this issue 8 years ago • 4 comments

First, I want to thank you for putting together and releasing this project. It seems that this is a good approach to the problem space of setting up the docker environment.

There are a few things that I would like to see changed:

  1. Extract top-level-domain to variable
  2. Stop editing /etc/hosts and use /etc/resolver (Note: this might be mac specific) with andyshinn/docker-dnsmasq
  3. Add ability to use existing project docker-compose.yml file. (so we could just run damp up within an existing project and it would ensure the docker-machine is running and the run docker-compose up -d

If you feel these changes are out of scope then please tell me. Otherwise, I am interested in contributing these changes.

For reference: I have spent a good amount of time developing an environment around docker which I've implemented some of these in a Makefile. Feel free to check it out: https://github.com/mathewpeterson/my-docker-environment

mathewpeterson avatar Feb 10 '16 14:02 mathewpeterson

Thanks for your suggestions Matthew. Can you explain what you mean by Extract top-level-domain to variable? I'm not sure about using anything too complex DNS wise as people are used to editing /etc/hosts coming from a MAMP/Vagrant background.

Having the ability to pass a custom docker-compose.yml is a good idea. Maybe it would be easiest to pass the config file location to damp up:

damp up --config=/path/to/docker-compose.yml

Do you want to have a go at submitting a PR for that?

gilbitron avatar Feb 15 '16 11:02 gilbitron

  1. Currently you use damp.dev for your domain. The main issue with this is that it's a real TLD and you do not own it. See http://www.iana.org/domains/root/db/dev.html. My suggestion is to use the .local TLD even though it's reserved for mDNS I think it's a better solution than using a valid TLD. Taking that a bit further, I would suggest making whatever root domain (e.g. damp.dev) configurable.
  2. I understand the desire to edit your /etc/hosts file but I don't think that's good practice. The constant update to editing your /etc/hosts file can issues down the road, especially when there is more than one program doing it. However, I feel the complexity of adding a dnsmasq container out weighs the headaches down the road. And once it's set up, the only time you need to worry about it is when your docker-machine host ip address changes (which you can account for within damp)
  3. Do you think it would be better to have a configuration file in ~/.damp? I think it would be important to keep those changes persistent.

Do you want me to open up separate issues for each of the above?

mathewpeterson avatar Feb 15 '16 14:02 mathewpeterson

Yes it probably makes sense to open a separate issue for each of those items and continue the conversation in the respective ticket.

gilbitron avatar Feb 15 '16 15:02 gilbitron