Skip to content

armand1m/microservices-compose-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microservices-compose-utils

This project contains simple bash files that can be used as alias to docker-compose commands. They are helpful to be used while developing microservices within the armand1m/microservices environment. It can also be used to run multiple microservices together as well.

Commands available:

  • init: Initialize git submodules.
  • update: Updates (git pull origin master) each git submodule.
  • build: Build docker images.
    • build <service-name>: Builds a single service.
  • run: Runs the environment.
    • run <service-name>: Runs a service and its dependencies, if specified.
    • run --build: Forces rebuild and runs all services.
    • run --build <service-name>: Forces rebuild and runs a single service.
  • test: Runs the docker-compose.test.yml defined.
    • test <service-name>: Runs a single service test suite.
  • logs: Get services logs to STDOUT
    • logs -f: Follow all services logs to STDOUT
    • logs <service-name>: Get a single service logs to STDOUT
    • logs -f <service-name>: Follow a single service logs to STDOUT
  • status: See the containers status.
  • destroy: Stop and remove containers.
  • clean: Stop containers and remove dangling images.
  • scale <service>=<number-of-insrtances>: Scale the number of instances of a service container.
  • deploy: Deploy images to a docker registry.
  • publish: Publish environment into single host or cluster.
  • generate: Generators Utility.
    • generate service: Service Generators Utility.
    • generate/environment <path>: Environment Generator Utility.

Using this repository

Add it as a git submodule in your project and run the commands in a shell. Make sure you have Docker running, and Docker Compose in your machine.

# add this project as a submodule into a folder. I like to use ./commands.
$ git submodule add https://github.com/armand1m/microservices-compose-utils ./commands

Use it:

# initialize git submodules
$ ./commands/init

# updates all git submodules
$ ./commands/update

# build docker images
$ ./commands/build

# testing services
$ ./commands/test

# run services
$ ./commands/run

# see all services logs
$ ./commands/logs

# follow all services logs
$ ./commands/logs -f

# see all services status
$ ./commands/status

# generate environment with gateway and service discovery containers configured
$ ./commands/generate/environment ~/Projects/new-environment

Releases

No releases published

Packages

No packages published

Languages