DiscordSaaSBot / SaaSBot

🤖 Discord bot for the builders and entrepreneurs community.
Apache License 2.0
11 stars 3 forks source link

Add Docker Support and Makefile for SaaS Bot #9

Open franciscof12 opened 7 months ago

franciscof12 commented 7 months ago

Objective

Tasks

Expected Outcome

With the addition of Docker support and a Makefile, developers can achieve a more streamlined workflow, minimizing setup time and reducing inconsistencies across different development environments. This update aims to make contributions to the project more accessible and efficient.

Additional Notes

Please ensure all configurations and code comments are in English to maintain consistency and avoid issues with special characters.

adriantoral commented 7 months ago

Improvements

Makefile would not be necessary since we can create a .sh An example of .sh is:

#!/bin/bash

if [ $# -eq 0 ]; then
    echo "Uso: $0 <param>"
    exit 1
fi

param=$1

case $param in
    "run")
        docker compose up -d
        ;;
    "stop")
        docker compose down --rmi local
        ;;
    "build")
        docker compose build
        ;;
    *)
        echo "Invalid option"
        ;;
esac

With a .sh we ensure that it can be run on all hosts, unlike a Makefile which requires the 'make' binary to run.

adriantoral commented 7 months ago

Improvements

Makefile would not be necessary since we can create a .sh An example of .sh is:

#!/bin/bash

if [ $# -eq 0 ]; then
    echo "Uso: $0 <param>"
    exit 1
fi

param=$1

case $param in
    "run")
        docker compose up -d
        ;;
    "stop")
        docker compose down --rmi local
        ;;
    "build")
        docker compose build
        ;;
    *)
        echo "Invalid option"
        ;;
esac

With a .sh we ensure that it can be run on all hosts, unlike a Makefile which requires the 'make' binary to run.

Updated Improvements

After some discussion on Discord, we decided to use Github Actions to implement Docker Compose. Makefile or .sh are no longer needed to create the image...