Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cakuki/docker-compose-wrapper
An example Docker Compose for Microservice Development
https://github.com/cakuki/docker-compose-wrapper
docker-compose microservice microservice-infrastructure
Last synced: about 2 months ago
JSON representation
An example Docker Compose for Microservice Development
- Host: GitHub
- URL: https://github.com/cakuki/docker-compose-wrapper
- Owner: cakuki
- License: mit
- Created: 2017-12-12T09:55:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-13T15:00:15.000Z (about 7 years ago)
- Last Synced: 2024-12-15T14:16:57.030Z (about 2 months ago)
- Topics: docker-compose, microservice, microservice-infrastructure
- Language: HTML
- Homepage: https://ckk.im/slides/2017-12-13-docker-compose-for-developing-microservices
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Compose Wrapper
This project is an example for "[Docker Compose for Developing Microservices](https://slides.com/ckk/docker-compose-for-developing-microservices)" presentation.
See [`./wrapper`](wrapper) script for scalable [`docker-compose`](https://docs.docker.com/compose/) configuration management.
This is only intended for local development.
## Running
```bash
./wrapper up
```Then open http://localhost:8080 on your browser.
## How does it work?
Instead of having single `docker-compose.yml` file this project offers a compose config for each service method. There is a different file for each service in `stack` directory. This method intended for increasing visibility and maintainability while developing microservices with Docker Compose.
## Generating service configurations
As all services in this project have generic form, they are genereted by `stack-generator` with a basic templating.
To `stack/*.yml` file for each service in `services` directory, run:
```bash
./stack-generator
```There is a small customization enabled for overring port forwarding. For that please inspect templating script source.
## Explore
You can basically use any `docker-compose` command with `./wrapper` script. Try `./wrapper config` to see merged output that's being used by Docker Compose process.
You can run in detached mode:
```bash
./wrapper up -d
```And monitor processes via:
```bash
./wrapper ps
```And watch logs of a service:
```bash
./wrapper logs -f cart-service
```Restart a specific service:
```bash
./wrapper restart checkout
```And scale:
```bash
./wrapper up -d --scale payment=3
```## License
Feel free to copy anything you like.
See [LICENSE](LICENSE).