Skip to content

AlexKintis/my-boilr-templates

Repository files navigation

My boilr templates

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.

Main window

Table of Contents

Templates

Jenkins

  • Jenkins Pipeline Template: A ready-to-use Jenkins pipeline template for CI/CD processes.

Docker

  • 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" ]

Javascript

  • 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

  • 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

Ansible

  • 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.

Usage

To use any of the templates in this repository with Boilr:

  1. Install Boilr (if not already installed):

     go install github.com/tmrts/boilr@latest
  2. Clone the repository:

    git clone https://github.com/AlexKintis/my-boilr-templates.git
  3. Navigate to the template directory:

    cd ./{template-category}
  4. Add the template to Boilr:

    boilr template save {template-path} {template-name}
  5. Use the template:

    boilr template use {template-name} {target-directory}
  6. Customize the generated project according to your needs.

About

This contains boilr templates for every day use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published