Storing submodules for microservices, but using plugs

I'm here. A lot of this is already in place, it's just a package that I cannot understand.

We have a microservice architecture with many separate repositories. We use Docker and Docker Compose to create and run a development environment that works great.

The question I have is how to pack the main collection of repositories. Therefore, if I have a folder structure, for example:

\
    service1
        .git
        Dockerfile
    service2 
        .git
        Dockerfile
    service3
        .git
        Dockerfile
    docker-compose.yml
    README.md

... where service1, service2, service3 are git's own repositories.

git , , , - . git , , , .

; , , , , , ; . , , , , ...

??

:)

+4
3

( , forks). :

  • , 1 project bootstrap .

, , :

  • JSON, "url", "fork_url", "name" , docker-compose, , . , fork url, url

  • ( - , Ruby it gem Thor, Go it package Cobra ..). , , , , . , .

  • project bootstrap . , :
    • JSON:
      • ,
      • , fork ( )
      • docker-compose.yml
+2

. , ?

, docker-compose.yml image ( build) -. , , docker-compose.yml , .

, docker-compose.yml ( bash script, makefile ..) .

, docker-compose.override.yml, ( , ).

+1

( Docker, Vagrantfile, VM ).

develop, docker-compose.yml. develop, , (, ~/workspace):

/Users/conar/workspace
  /develop
    /docker-compose.yml
  /service1
    /Dockerfile
    /app.js
  /service2
    /Dockerfile
    /app.js
  /service3
    /Dockerfile
    /app.js

docker-compose.yml :

service1:
  build: ../service1/Dockerfile
  volumes:
    - ../service1:/app
service2:
  build: ../service2/Dockerfile
  volumes:
    - ../service2:/app
service3:
  build: ../service3/Dockerfile
  volumes:
    - ../service3:/app

app.js ( ) /app.

0

Source: https://habr.com/ru/post/1618627/


All Articles