automaticmode / active_workflow

Polyglot workflows without leaving the comfort of your technology stack.
https://www.activeworkflow.org
Other
830 stars 67 forks source link

Using alpine image #4

Closed hdf1996 closed 4 years ago

hdf1996 commented 4 years ago

Hi! Just tried active_workflow on Heroku, and right now im starting to install it on my raspberry.

I was thinking of making a pull request for changing

services:
  postgres:
    image: postgres:9.5

to

services:
  postgres:
    image: postgres:9.5-alpine

Alpine is a small version of linux, it has some small differences with other distros, but at least for the database, the change should be transparent, and it consumes lot less space, ram, and cpu (You can read more about it on https://alpinelinux.org/about/)

What do you think about the change?

vidas commented 4 years ago

Hi! Thanks for showing interest in ActiveWorkflow!

I have benchmarked alpine sometime before and found that there is a considerable difference in image size, but not so much in memory consumption (I've tested it on x64 though). I see no harm in switching postgres to an alpine based image. The provided docker-compose.yml is intended for small single-machine installations and testing, serious production deployments most likely use managed database or some custom configuration anyway.

I'll implement the change myself, no need for PR. Thank you for the offer and good luck deploying on a raspberry! (RPi is not officially supported (or targeted) deployment option, but constrained environments are often a good check for bloat.)

As for ActiveWorkflow itself, lowering memory consumption is on the roadmap, but I doubt alpine would be a reasonable option in the near future. The image size is dominated by dependencies. Also, many gems do (may) require a wide array of -dev packages for building.

hdf1996 commented 4 years ago

Sounds good! Will mark the issue as closed :)