diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..b1c4d2b --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,10 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: pip install -r requirements.txt + + diff --git a/README.md b/README.md index 216d981..3ae96d7 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,30 @@ - **YT Video [How to deploy on Koyeb]**: ## 🐳 Docker - -```shell -docker run --env API_ID=your_api_id --env API_HASH=your_api_hash --env DATABASE_TYPE=db_type --env STRINGSESSION=your_string_session --env PM_LIMIT=pm_permit_warn_limit --env DATABASE_NAME=db_name --env DATABASE_URL=mongo_db_url --env APIFLASH_KEY=api_flash_key --env RMBG_KEY=rmbg_key --env VT_KEY=vt_key --env GEMINI_KEY=gemini_key --env COHERE_KEY=cohere_key --env VCA_API_KEY=vc_key -d qbtaumai/moonuserbot:latest -``` +You can either use `docker run` or `docker compose`. + +### 👷‍♂️`docker run`: + - Start: + ```shell + docker run --env API_ID=your_api_id --env API_HASH=your_api_hash --env DATABASE_TYPE=db_type --env STRINGSESSION=your_string_session --env PM_LIMIT=pm_permit_warn_limit --env DATABASE_NAME=db_name --env DATABASE_URL=mongo_db_url --env APIFLASH_KEY=api_flash_key --env RMBG_KEY=rmbg_key --env VT_KEY=vt_key --env GEMINI_KEY=gemini_key --env COHERE_KEY=cohere_key --env VCA_API_KEY=vc_key -d qbtaumai/moonuserbot:latest + ``` + - Updating: + ```shell + docker stop $(docker ps -q) && docker rm $(docker ps -a -q) + ``` + then re-run the start command + +### 🍟 `docker compose` [recommended]: +> [!NOTE] +> To use docker compose you will have to put your environment vars in `.env` file check [.env.dist](/.env.dist) for example format + - Start: + ```shell + docker compose up -d + ``` + - Updating & running: + ```shell + docker-compose down && docker-compose pull && docker-compose up -d + ``` > [!IMPORTANT] > Make Sure you add appropriate env vars diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3675145 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + moonuserbot: + image: qbtaumai/moonuserbot:latest + container_name: moonuserbot + restart: unless-stopped + env_file: + - .env + networks: + - default + +networks: + default: + external: false