lofocats_api
lofocats_api copied to clipboard
Work toward being Cloud Native and support Docker
Hi @iridakos,
I was looking for a small and simple app to make my own demo of running an app on a Cloud provider and I chose yours.
I don't know if you accept contributions or still maintain this project, but I did some work to make this application more "Cloud native" and to support Docker:
- Add
Dockerfile:postgresql-clientis only required bywait-for-postgres.sh(feel free to rewrite it in Ruby if you want to).- the container can be run as
daemon(UID 2) instead ofroot
- Add
docker-compose.ymlfor development:- Mount bind the working directory, so your changes are directly available to the container when developing
- The migrations are run when going
upand then exit (can be restarted on demand)
- Accept configuration from environment variables
- Send logs to
SDTOUT - Add basic health and metrics endpoints
- Replace SQLite by PostgreSQL, so multiple replicas can use the same DB (
db/schema.rbwas updated automatically) - Fix test suite (mainly for PostgreSQL)
- Add
docker-compose.test.ymlto create an isolated test environment (usable with Docker Hub Autotest feature)
I'm not a Ruby/Rails developer, so some changes might be raw, but I'm open to feedback.
Cheers, Max
Hi @maxbrunet and thank you very much for contributing! It's been a while since the last time I wrote code for this repo but it's of course open for contributions!
I will check the pull request and merge it as soon as possible!
Thank you :+1: