This project helps developers quickly deploy backing services that are commonly used during the development cycle. It contains Terraform modules for deploying Docker stacks into a Swarm cluster. For automated deployment, refer to the Automated Setup section. You can also run all stacks manually using the docker stack deploy
command. For manual instructions, see the Manual Setup.
To access the latest releases, visit Releases.
Before you begin, ensure you have the following tools installed:
Make sure to configure your AWS CLI. Create or edit the ~/.aws/config
file:
[profile localstack]
region=us-east-1
output=json
endpoint_url = http://localhost:4566
Also, set up your credentials in ~/.aws/credentials
:
[localstack]
aws_access_key_id=test
aws_secret_access_key=test
To initialize your Docker Swarm, run the following command:
docker swarm init --task-history-limit=0
This command sets up your Swarm cluster, allowing you to deploy services.
Use Terraform to provision your Docker Swarm cluster, deploy stacks, and manage resources efficiently. The Terraform scripts in this repository simplify the deployment process.
Clone the repository:
git clone https://github.com/garu1112/docker-swarm-stacks.git
cd docker-swarm-stacks
Initialize Terraform:
terraform init
Plan your deployment:
terraform plan
Apply your configuration:
terraform apply
This process will provision the necessary resources and deploy the defined stacks.
If you prefer to deploy stacks manually, you can use the docker stack deploy
command. Here’s how:
Run the following command:
docker stack deploy -c <your-stack-file>.yml <stack-name>
Replace <your-stack-file>.yml
with the name of your stack file and <stack-name>
with your desired stack name.
This repository supports various services, each useful for different aspects of development. Here’s a list of the services included:
We welcome contributions to improve this project. If you want to contribute, please follow these steps:
git checkout -b feature/YourFeature
).git commit -m 'Add some feature'
).git push origin feature/YourFeature
).Please ensure your code adheres to the project’s coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For more information, check the Releases section.