This repository contains a collection of templates designed for various projects, including Jenkins, Docker. These templates are created to be used with Boilr, a project scaffolding tool that helps you rapidly create project structures.
- Jenkins Pipeline Template: A ready-to-use Jenkins pipeline template for CI/CD processes.
-
Docker Compose (DOES not work): Template for defining and running multi-container Docker applications using Docker Compose.
-
Docker Image Wrapper Script Template: Script template which is for building and wrapping a docker image and executing it as an "host level" command.
For example, This is the command that will be executed inside the container:
docker run --network="host" --rm -v $(pwd):/pwd my-command <ARGS>
The script will be like this (which will have the same effect as the command above):
my-command-wrapper.sh <ARGS>
NOTE: The
Dockerfile
should have the following structure in order to work properly:FROM image:tag # Do what you have to do to build the image # Maybe export to the path the desired command # For example: ENV PATH=$PATH:/the/path/to/my-command # Create a directory to mount the host's directory RUN mkdir -p /pwd # Set the working directory to the mounted directory WORKDIR /pwd # And then add as an entrypoint the command that will be executed ENTRYPOINT [ "my-command" ]
-
Typescript NodeJS Template: A template for setting up a Node.js project with TypeScript.
This template will have the following structure:
. ├── .eslintrc.json <-- ESLint configuration file ├── .gitignore <-- Git ignore file ├── package.json <-- Node.js package file ├── src │ └── app.ts <-- Main TypeScript file └── tsconfig.json <-- TypeScript configuration file
By applying the above template you will have a ready-to-use typescript to node project which you will can run with the following commands:
# This will run (npx tsc) npm run build
and then run the compiled javascript file with:
# This will run (node dist/src/app.js) npm run exec
-
Nix Flake Template: A template for setting up a Nix flake project.
This template will have the following structure:
. └── flake.nix <-- Nix flake configuration file
By applying the above template and making the necessary modifications you will have a ready-to-use nix flake project which you will can run with the following commands:
# This will run (nix run) nix run (or nix run .#<attr>) # This will run (nix build) nix build # This will run (nix develop) nix develop
-
Full Ansible Project: A full ansible project.
-
Ansible (wiki): A README.md file which contains the core concepts of Ansible.
This template will have the following structure:
. ├── project.json ├── README.md └── template ├── ansible.cfg ├── inventory ├── playbooks ├── roles └── (and more)
By applying the above template you will have a ready-to-use README.md file which contains the core concepts of Ansible.
To use any of the templates in this repository with Boilr:
-
Install Boilr (if not already installed):
go install github.com/tmrts/boilr@latest
-
Clone the repository:
git clone https://github.com/AlexKintis/my-boilr-templates.git
-
Navigate to the template directory:
cd ./{template-category}
-
Add the template to Boilr:
boilr template save {template-path} {template-name}
-
Use the template:
boilr template use {template-name} {target-directory}
-
Customize the generated project according to your needs.