Skip to content

Question: Why no docker-compose? #55

Open

Description

@woutersamaey

I just wanted to ask why this container contains everything in 1 container. It is best practise to have a 1 process per container and not put everthing in 1. It improved logging and monitoring.

Has this been considered and what are the arguments against it?

Activity

  1. vdloo commented on Oct 27, 2021

    @vdloo
    Member

    Hi @woutersamaey, we use a fat container because the goal of this Docker is to be representative of a Hypernode production environment to facilitate local development. In production we use VMs not containers. For local development and to keep the userland similar to what you might experience on a real Hypernode it would stray too far away from reality to use separate containers with docker-compose.

    Basically we just run Ansible on a container and snapshot that, it's very similar to a Hypernode production environment except instead of systemd there are some helper scripts to run the services. That way you can test and develop your changes with minimal risk of deploying to a real Hypernode and then finding out things are configured a bit differently / running a different software version from what your software is expecting.

    From the README:

    We build this image multiple times a day (every time we do a release) by applying our configuration management on the phusion/baseimage-docker 'fat' container. By treating the Docker as a lightweight VM instead of as a vehicle for a single process we stay close to what an actual Hypernode actually looks like. No micro-services or a multi-container application, but a single instance with minimal network overhead and all batteries included.

    If you're looking for something similar that uses docker-compose you could look into something like https://github.com/JeroenBoersma/docker-compose-development or https://github.com/markshust/docker-magento for example. I have no experience with those but from what I've heard they do take that approach.

    You could still mix and match by the way with this container, for example if you need a version of ElasticSearch that currently isn't baked into one of the images you could of course spin up a separate docker with that service and link them with docker-compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions