Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/professormanhattan/template-docker-compose
👉 Starting point / instructions for creating a Docker Compose / Stack repository
https://github.com/professormanhattan/template-docker-compose
app ci codeclimate compose container docker docker-compose docker-stack dockerfile gitlab gitlab-ci mblabs megabytelabs pipeline professormanhattan stack virtualization washingtondc
Last synced: 19 days ago
JSON representation
👉 Starting point / instructions for creating a Docker Compose / Stack repository
- Host: GitHub
- URL: https://github.com/professormanhattan/template-docker-compose
- Owner: ProfessorManhattan
- License: other
- Created: 2022-04-23T14:36:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-23T13:05:41.000Z (almost 2 years ago)
- Last Synced: 2024-11-25T22:53:40.081Z (26 days ago)
- Topics: app, ci, codeclimate, compose, container, docker, docker-compose, docker-stack, dockerfile, gitlab, gitlab-ci, mblabs, megabytelabs, pipeline, professormanhattan, stack, virtualization, washingtondc
- Language: Shell
- Homepage: https://megabyte.space
- Size: 1.98 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: docs/CODEOWNERS
Awesome Lists containing this project
README
{{ load:.config/docs/readme/header.md }}
>
**Starting point / instructions for creating a Docker Compose / Stack repository**
## Table of Contents
- [Docker-Compose Project](#docker-compose-project)
- [Requirements](#requirements)
- [Development Requirements](#development-requirements)
- [Docker Compose / Stack Project](#docker-compose--stack-project)
- [Docker Containers](#docker-containers)
- [Configuration Management](#configuration-management)
- [Re-Building the Repository](#re-building-the-repository)
- [Contributing](#contributing)
- [Affiliates](#affiliates)
- [License](#license)## Docker-Compose Project
This is a Docker Compose / Swarm project.
## Requirements
- **[Docker](https://gitlab.com/megabyte-labs/ansible-roles/docker)**
### Development Requirements
- **[DockerSlim](repository.project.dockerslim)** - Used for generating compact, secure images
- **[jq](repository.project.jq)** - Used for interacting with JSON
- **[Node.js](repository.project.node)** (_>=14.18_) - Utilized to add development features like a pre-commit hook and maintenance tasks
- _Many more_ requirements that are _dynamically installed_ as they are needed by our `Taskfile.yml` via our custom [go-task/task](https://github.com/go-task/task) fork named **[Bodega](https://github.com/ProfessorManhattan/Bodega)**If you choose to utilize the development tools provided by this project then at some point you will have to run `bash start.sh` (or `npm i` which calls `bash start.sh` after it is done). The `start.sh` script will attempt to automatically install any requirements (without sudo) that are not already present on your build system to the user's `~/.local/bin` folder. The `start.sh` script also takes care of other tasks such as generating the documentation by calling tasks defined in the `Taskfile.yml`. For more details on how the optional requirements are used and set up, check out the [CONTRIBUTING.md](https://gitlab.com/megabyte-labs/docker/docker-compose/template-docker-compose/-/blob/master/docs/CONTRIBUTING.md) guide.
When you are ready to start development, run `task --menu` to open an interactive dialog that will help you understand what build commands we have already engineered for you.
## Docker Compose / Stack Project
We house most of our Docker Compose / Stack configurations in our [Ansible Docker Swarm role](https://github.com/megabyte-labs/ansible-swarm). However, when a stack is more complicated and might need to include other files (i.e. Terraform files, or special configuration files) then we dedicate a repository to the project.
Unlike our [Dockerfile](https://gitlab.com/megabyte-labs/templates/docker) repository projects, we do not have a strict repository style guide. There are, however, a few things to keep in mind.
Docker Compose / Stack configurations are supposed to be easy to use, one-liner ways of launching otherwise somewhat complicated networks. So if the repository is not launchable by just running `docker up -d docker-compose.yml` then a file called `launch.sh` should be included in the repository. The `launch.sh` file should make setting up the stack a one-liner process.
### Docker Containers
If the stack requires containers that are not from reputible sources or if the stack would benefit from having custom Dockerfile container builds then each Dockerfile should have its own repository in the appropriate sub-group in the [Docker group](https://gitlab.com/megabyte-labs/docker). Please also look over the [README of our Dockerfile boilerplate](https://gitlab.com/megabyte-labs/template/docker).
### Configuration Management
In order to make the experience truly simple and adhere to the one-liner principle, it may be required to incorporate some sort of configuration management strategy. This should be done by either using Ansible or Terraform. In cases where performance is vital, Saltstack can be used as well.
The configuration choices should be thorough and automatically apply the settings that would satisfy the needs of most users. The configurations should make a best-effort at integrating with the other software we include in [Gas Station](https://github.com/megabyte-labs/Gas-Station), [JumpUSB](https://jumpusb.com), and any platform/service that a typical GitHub power-user would have in their stack.
That all said, the most important part of the project is to understand and have an intuitive feel for the stack's requirements.
### Re-Building the Repository
You can begin the project using this repository as a boilerplate. It might also be helpful to check out some of the [other Docker Compose / Stack repositories](https://gitlab.com/megabyte-labs/docker/docker-compose). When you are done creating the stack, be sure to update the repository's metadata and documentation. You can do this by editting the fields in the `blueprint` section of the `package.json` file. After that, edit the documentation by adding your project-specific documentation written in markdown to the `docs/partials/guide.md` file. With the `blueprint` section and the documentation partial populated, you can re-compile the repository by running `bash start.sh && task update`. Be sure to add a custom transparent square `logo.png` to the root of this repository for good measure.
And that is all, you are ready to polish this Docker stack and open a pull request.
## Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/megabyte-labs/template-docker-compose/issues). If you would like to contribute, please take a look at the [contributing guide](https://github.com/megabyte-labs/template-docker-compose/blob/master/docs/CONTRIBUTING.md).
Sponsorship
Dear Awesome Person,
I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.
Sincerely,
**_Brian Zalewski_**
### Affiliates
Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:
## License
Copyright © 2020-2021 [Megabyte LLC](https://megabyte.space). This project is [MIT](https://gitlab.com/megabyte-labs/templates/docker-compose/-/blob/master/LICENSE) licensed.