Sample multi docker compose environment setup

Instructions

This is a demonstration of a Multi Docker Compose.

The purpose of this repositoy is ongoing research on "Docker compose" architecture design for easier and elegant control over the services, without duplication.

Create a new project environment aka sample platform

To create a new environment

mkdir platform-new
touch platform-new/.env
ln -s docker-compose.base.yml platform-new/docker-compose.yml
touch platform-new/docker-compose.override.yml

Tree view visualizing of the filesystem

platform-new/
├── data
│   └── backend1
│       └── config
│           └── main.yml
├── docker-compose.override.yml
└── docker-compose.yml -> ../docker-compose.base.yml

In short:

  • We link the original docker-compose.base.yml.

  • We create new .env file.

    • Each .env can configure the inside/outside ports and other user configurable options.

Each override has the example structure:

version: '3'

services:
    backend1:
        # add content here
        volumes:
            - ./data/backend3/config:/config

Note:

  • Each platform environment will not to be committed to GIT.

  • The platform environments will be created on the dev machine or production.

  • There can be an infinite number of environments on one machine/node as long as the ports are different in each .env file.

  • Having a data directory which can be mounted/binded to particular location inside the target service.

Environment keys:

  • PORT_BACKEND1 is the outside port

  • PORT_BACKEND1_IN is the inside port

  • BACKEND1_PORT is the listen port for the service

Commands

Rebuild

cd platform-dev  # sample env
docker-compose build
docker-compose up -d

Test: http://localhost:8003

Status

cd platform-dev  # sample env
docker-compose ps

Features (desired)

  • Multi environment docker compose

  • Building an image instructions

  • Controlling inside env vars

  • Controlling outside env vars in docker -compose

  • Structuring environment variables for easier control and maintaince

  • Multi stage Dockerfile builds

Reference

TODOS

Please check the Issues section for a complete list of pending features here.

Owner
Damjan Dimitrioski
I tend to learn new things, take big challenges. Aimed to push the human mind limits.
Damjan Dimitrioski
Similar Resources

Execute multiple shell commands like Docker-Compose

parx parx is a simple tool to run multiple commands in parallel while having the output structured like Docker Compose does that. This is useful when

Aug 15, 2022

Docker-compose files for running full Storj network locally

docker-compose based Storj environment storj-up is a swiss-army tool to create / customize Storj clusters with the help of docker-compose (not just st

Nov 16, 2022

Katenary - Convert docker-compose to a configurable helm chart

Katenary - Convert docker-compose to a configurable helm chart

Katenary is a tool to help transforming docker-compose files to a working Helm C

Dec 23, 2022

A multi-service dev environment for teams on Kubernetes

A multi-service dev environment for teams on Kubernetes

Tilt Kubernetes for Prod, Tilt for Dev Modern apps are made of too many services. They're everywhere and in constant communication. Tilt powers multi-

Jan 5, 2023

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration

Karmada Karmada: Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration Karmada (Kubernetes Armada) is a Kubernetes management system that enables

Dec 30, 2022

Go WhatsApp Multi-Device Implementation in REST API with Multi-Session/Account Support

Go WhatsApp Multi-Device Implementation in REST API This repository contains example of implementation go.mau.fi/whatsmeow package with Multi-Session/

Dec 3, 2022

sample apps docker with postgres-node.js-golang

Belajar Docker untuk Pemula - Membuat TODO App TODO app ini adalah contoh app untuk mendemokan proses membuat aplikasi dengan Docker, terdiri dari: Fr

Jan 2, 2022

Testcontainers is a Golang library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.

When I was working on a Zipkin PR I discovered a nice Java library called Testcontainers. It provides an easy and clean API over the go docker sdk to

Jan 7, 2023

fiber-air-docker development environment boilerplate, examples

fiber-air-docker development environment boilerplate, examples

ON AIR! fiber-air-docker development environment boilerplate TODO on air 세션 준비 fiber 유저 준비 gorm 외래키 준비 아키텍쳐 참고 https://blog.puppyloper.com/menus/Golan

Sep 14, 2022
Comments
  • Vault integration for sensitive env keys

    Vault integration for sensitive env keys

    Ongoing research which are the best vaults for keeping secrets

    References:

    • https://hub.docker.com/_/vault

    Purpose of vaults:

    • Dynamic change of secrets without service reload

    • Making sure keys are encrypted

    • Make sure keys are available only for a given services

  • Examples having the separate extracted service .env-{service} putting it in practical use

    Examples having the separate extracted service .env-{service} putting it in practical use

    Add examples for #3

    • [ ] service 1 with ports and volumes
    • [ ] service 2 links to the other service or second services based on sample env (testing or live)
    • [ ] all services to have 2 different networks
    • [ ] Separated .env per service-
    • [ ] Prepare a video make a sample platform
  • Separate the .env variables for each service in separate .env-{service} for each sample environment

    Separate the .env variables for each service in separate .env-{service} for each sample environment

    List of things to extract variables from

    • [ ] Find what to keep in the .env file after separation in multiple .env-{service} files
    • [ ] Ports in:out:inside
    • [ ] Volumes paths
    • [ ] Hosts
    • [ ] Links paths
    • [ ] Image version
    • [ ] Labels
    • [ ] Command arguments
    • [ ] Network names?
Dotnet-appsettings-env - Convert .NET appsettings.json file to Kubernetes, Docker and Docker-Compose environment variables

dotnet-appsettings-env Convert .NET appsettings.json file to Kubernetes, Docker

Dec 30, 2022
Dotnet-appsettings-env - Convert .NET appsettings.json file to Kubernetes, Docker and Docker-Compose environment variables

dotnet-appsettings-env Convert .NET appsettings.json file to Kubernetes, Docker

Feb 16, 2022
Mutagen Compose is a modified version of Docker Compose that offers automated integration with Mutagen.

Mutagen Compose Mutagen Compose is a (minimally) modified version of Docker Compose that offers automated integration with Mutagen. This allows you to

Dec 22, 2022
Easily run your Compose application to the cloud with compose-cli

This CLI tool makes it easy to run Docker containers and Docker Compose applications in the cloud using either Amazon Elastic Container Service (ECS) or Microsoft Azure Container Instances (ACI) using the Docker commands you already know.

Jan 8, 2023
Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.
Hassle-free minimal CI/CD for git repositories with docker or docker-compose projects.

GIT-PIPE Hassle-free minimal CI/CD for git repos for docker-based projects. Features: zero configuration for repos by default automatic encrypted back

Sep 23, 2022
Tool to convert docker-compose files to set of simple docker commands

docker-decompose Tool to convert docker-compose files to set of simple docker commands. Install Use go get to install the latest version of the librar

Apr 12, 2022
EdgeDB-Golang-Docker-Sample - The sample of connection between EdgeDB Server and Go Echo API Server

EdgeDB Golang Docker Sample 『Go + Docker Composeを使ってEdgeDBを動かしてみた』のサンプルコードです。 使い

Nov 2, 2022
Go-http-server-docker - Simple sample server using docker and go

go-http-server-docker Simple sample webserver using docker and go.

Jan 8, 2022
Example used to try a compose application with Docker Dev Environments

compose-dev-env Example used to try a Compose application with Docker Dev Environments. This example is based on the nginx-golang-mysql sample of awes

Dec 29, 2022
Mesos Framework to use docker-compose files.
Mesos Framework to use docker-compose files.

mesos-compose Mesos Framework to use docker-compose files. Requirements Apache Mesos min 1.6.0 Mesos with SSL and Authentication is optional Redis Dat

Dec 14, 2022