aar6ncai / 3musketeers

Test, build, and deploy your apps from anywhere, the same way!

Home Page:https://3musketeers.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3 Musketeers

Build Status Netlify Status License

The 3 Musketeers is a pattern for developing software in a repeatable and consistent manner. It leverages Make as an orchestration tool to test, build, run, and deploy applications using Docker and Docker Compose. The Make and Docker/Compose commands for each application are maintained as part of the application’s source code and are invoked in the same way whether run locally or on a CI/CD server.

pattern-overview

Why?

Consistency

Run the same commands no matter where you are: Linux, MacOS, Windows, CI/CD tools that supports Docker like GitHub Actions, Travis CI, CircleCI, and GitLab CI.

Control

Take control of languages, versions, and tools you need, and version source control your pipelines with your preferred VCS like GitHub and GitLab

Confidence

Test your code and pipelines locally before your CI/CD tool runs it. Feel confident that if it works locally, it will work in your CI/CD server.

Prerequisites

Usage

Create the two following files:

# file: docker-compose.yml
version: '3'
services:
  alpine:
    image: alpine
# file: Makefile

# echo calls Compose to run the command "echo 'Hello, World!'" in a Docker container
echo:
	docker-compose run --rm alpine echo 'Hello, World!'

Then simply echo "Hello, World!" with the following command:

$ make echo

For more information, visit 3musketeers.io.

Website

This repository is the 3musketeers.io website. This section explains how to develop, test, and deploy it using the 3 Musketeers.

Prerequisites

Development

# create a .env file
$ make envfile ENVFILE=env.example
# Update .env file to set VUEPRESS_HOST=node_dev
# install dependencies
$ make deps
# start vuepress server in a container for local development
$ make startDev
# access the website in your browser at http://localhost:8080/
# in a different shell session
$ make lint
$ make test
$ make clean

Testing

$ make envfile ENVFILE=env.example
$ make deps
$ make lint
# start vuepress in a container in the background
$ make start
$ make test
$ make clean

# See targets `all`, and `ciTest`

Deployment

# create a .env that sets environment variables for production. For instance
$ make envfile ENVFILE=.env.production
# building the static website
$ make build
# deploy the website to Netlify
$ make deploy

# See target `ciDeploy`

Contributing

Thanks goes to these wonderful people.

The 3 Musketeers is an open source project and contributions are greatly appreciated.

Please visit https://3musketeers.io/about/contributing.html for more information.

Credits

License

MIT

About

Test, build, and deploy your apps from anywhere, the same way!

https://3musketeers.io

License:MIT License


Languages

Language:Makefile 37.3%Language:JavaScript 30.3%Language:TypeScript 21.7%Language:Shell 10.8%