internetarchive / arklet

ARK minter, binder, resolver
MIT License
21 stars 16 forks source link

Adding full docker development (& prod) files, including docker-compose, and updating to 12-factor #1

Closed PieterjanMontens closed 2 years ago

PieterjanMontens commented 2 years ago

Hello ! I was about to start working on my own ark minter & resolver and discovered this project.

I have some Django experience, and I'm accustomed to deploying with docker in twelve-factor style.

So I did some work on (1)setting up a local development environment with docker-compose, and (2)updated the settings file to use django-environ. Configuration can still be written to a dotenv (.env.) file in the root directory. I also (3)fixed the resolver for non-local naan's amd (4)updated the readme.md. At this moment I tested everything locally, and everything works.

If all goes to plan, we (belgian non-profit, we already registered our Naan) intend to use this package on our own resolver, n2d.eu (still in development).

Please feel free to comment or suggest modifications to the PR 👍

avdempsey commented 2 years ago

Hi @PieterjanMontens what a pleasant surprise this is! Thank you for giving this project a look and making these contributions.

I'll need a couple days to digest the docker config. Otherwise I'll give things a proof-read, the django-environ and views.py change already look good.

I was planning on doing a couple of clean-ups on this repo this week ahead of Internet Archive publicly announcing the project. This PR is well-timed :D

avdempsey commented 2 years ago

Hi @PieterjanMontens what a pleasant surprise this is! Thank you for giving this project a look and making these contributions.

I'll need a couple days to digest the docker config. Otherwise I'll give things a proof-read, the django-environ and views.py change already look good.

I was planning on doing a couple of clean-ups on this repo this week ahead of Internet Archive publicly announcing the project. This PR is well-timed :D

PieterjanMontens commented 2 years ago

Hello @avdempsey , great to hear ! I was about to start building my own ark minter until I found this project by chance, with clean and clear code and in a tech stack I'm familiar with, so I'm very pleased as well 👍

I have some more work in another branch (see https://github.com/PieterjanMontens/arklet_frk/pull/1/files) for production deployment (gunicorn & static files) if you're interested.

And I'd be really glad to contribute on this project : I did not find a lot of usable and documented ark minters & resolvers, and none met the few requirements I had. This one looks very promising, and being built on Django it hits the sweet spot between ease of development, maintenance efforts, back-office burden and the functionality it can offer.

Other projects I'm aware of :

PieterjanMontens commented 2 years ago

Back to the PR: For the docker files : as docker was already mentioned in the README, it felt right to take it a bit further with a full Dockerfile and docker-compose.

And for the config and environment changes : 12-factor is a methodology to build web apps optimized for :

All-in-all, desirable aspects for an open-source project in which people come & go and to reduce obstacles and frictions to develop or deploy.

That being said, if you don't feel comfortable with the changes that's not a problem : it's merely about the environment and the deployment of it, and I can maintain my own fork while contributing to the application code 👍

avdempsey commented 2 years ago

Thank you @PieterjanMontens!