duct

2019-11-21T06:13:32.239800Z

Yeah @iarenaza, I issued

lein clean
lein uberjar 
docker build . -t film-ratings-app 
docker-compose up -d  && docker-compose logs -f
However, I much prefer your suggestion of externalising the commands…

2019-11-21T06:27:01.241800Z

Oh bolx, it was a Docker problem. The above commands were correctly rebuilding film-ratings-app but my docker-compose.yml was referencing film-ratings_filmapp and thus you were correct, I was starting stale images. Cheers, and I’ll refactored to externalised config next. Thank you.

Janne Sauvala 2019-11-21T14:05:04.244800Z

hi 👋:skin-tone-2: would you recommend Duct as a good framework for a greenfield project? I have previously used just plain Ring in one project and Pedestal in another. With Pedestal I faced some frustration because the documentation wasn’t very comprehensive

2019-11-22T09:47:09.251300Z

@sgerguri can I see the details of the painpoints and design defect somewhere?

2019-11-22T09:58:36.251500Z

I can't show any code but it boils down to the duct modules having their own set of keys through which you can configure them in a limited fashion, and a bunch of underlying integrant methods that you can override if you know what they are - but then you need to open the sources to see what they are. Which kind of defeats the point of using the module in the first place. The configuration of the modules is also strange, because internal overrides for the aforementioned integrant methods cannot be dropped into the module's config map, but need to be top level if I remember correctly. It feels like a semi-opaque wrapper that just gives you some default functionality but still expects you to read the sources.

Janne Sauvala 2019-11-22T11:32:08.251700Z

Thanks @iarenaza and @sgerguri for your insight! It good to know that there are services using Duct in production. I’m not familiar with integrant but I have used Component library before. The EDN style configuration sounds interesting but I haven’t heard many people using it

2019-11-23T00:31:42.286400Z

Just to clarify, Duct modules are pure functions that transform the configuration. Typically this is used to add default configuration.

2019-11-21T14:29:44.245200Z

The documentation of Duct isn’t particularly good right now. So if you’re frustrated by Pedestal’s documentation, you’re likely not going to be impressed with Duct’s. That said, if you can get over the rough edges, it will get better in future.

2019-11-21T14:30:06.245400Z

Though not exactly the same thing, Luminus had reasonable documentation last time I looked.

Janne Sauvala 2019-11-21T14:42:53.245600Z

I was able to found sample code for Pedestal quite easily. I faced this problem when I was dockerizing the application https://github.com/pedestal/pedestal/issues/604 which felt kinda random issue and took some time to figure it out

Janne Sauvala 2019-11-21T14:43:19.245900Z

I would be happy if I don’t have to see that kind of problems with Duct 😄

2019-11-21T15:51:15.246100Z

I do know that Duct has been used by several people in containers without issue.

Janne Sauvala 2019-11-21T15:55:43.246300Z

That’s good to know. Maybe I do a small spike with Duct and see how it is to use

2019-11-21T15:56:31.246500Z

You may want to start here: https://github.com/duct-framework/docs/blob/master/GUIDE.rst

Janne Sauvala 2019-11-21T16:03:24.246800Z

I’ll take a look, cheers 👌:skin-tone-2:

iarenaza 2019-11-21T17:45:12.247Z

Just to pile up on @weavejester comment, we at Magnet are using Duct in all of our projects since the beginning of 2018. And all of them are Dockerized since day one. Using docker-compose to develop locally, and deploying to AWS Elastic Beanstalk for testing/production. No issues related to Docker so far.

y.khmelevskii 2019-11-21T17:50:02.248200Z

@janne.sauvala also maybe this repo will be useful https://github.com/khmelevskii/duct-pedestal-reitit

ccann 2019-11-21T20:30:03.249900Z

Does :duct.profile/local always get merged or with the system configuration?

2019-11-22T14:14:35.252500Z

It gets added while in development, but isn’t added to production environments.

2019-11-22T14:14:59.252700Z

It’s intended as a mechanism for developers to add their own configuration changes independent of source control.

2019-11-22T14:15:39.252900Z

For example, adding a database URL to a database running on their local machine.

ccann 2019-11-21T20:30:59.250800Z

I’ve created a new test profile and it seems to override that profile’s config despite not passing :duct.profile/local to the prep-config function

2019-11-21T20:54:27.250900Z

I had a shot at using duct internally at our place and we bounced off it pretty hard. To be fair to @weavejester he's spent some time in private conversation with me around the painpoints we've had with it but I'm simply not convinced by duct's half-open modules - I think the way they're implemented is a design defect that removes any advantages out of using them, and it has everything to do with how they're configured and documented. I can probably recommend Luminus - we're using some of the libraries which that framework uses, and only don't use the template as a whole because we have our own spin on certain things and don't need a good half or more what Luminus gives you. That said, mount ring and cprop have been the underpinnings of our services and have served us very well. I would probably suggest building out your own template using the libraries you like as that means you can tailor everything to your specific use case.