All my projects are docker based. As much as I love using it, i hate the extra commands you need to run for trivial stuffs like starting a rails server, console or migrations.
I usually keep those scripts in bin/ folder and simply execute the file. This way its much more straightforward and can be documented in README file for new devs.
I'm a full stack web developer who has been freelancing for the last 20 years. I write about everything from development to production and also have video courses on my site!
In that case I would ditch the scripts and just set up a few aliases at the Bash level. This way you can shorten up the command to almost what it would be without Docker, and you don't need to lug around scripts to each project.
I have some made to where I just type dew rails c and it opens a console by running docker-compose exec web rails c under the hood.
I'm a full stack web developer who has been freelancing for the last 20 years. I write about everything from development to production and also have video courses on my site!
All my projects are docker based. As much as I love using it, i hate the extra commands you need to run for trivial stuffs like starting a rails server, console or migrations.
I usually keep those scripts in
bin/
folder and simply execute the file. This way its much more straightforward and can be documented in README file for new devs.How do you feel about this approach?
I agree with you.
Aliases are ok but I would prefer something that doesn't leak outside of the project.
So bin/ folder is better option IMHO.
Hi,
In that case I would ditch the scripts and just set up a few aliases at the Bash level. This way you can shorten up the command to almost what it would be without Docker, and you don't need to lug around scripts to each project.
I have some made to where I just type
dew rails c
and it opens a console by runningdocker-compose exec web rails c
under the hood.I agree but that still does not help much when you have some inexperienced developers in team.
Then make them experienced. :D