Skip to content

Commit

Permalink
add docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiTheModder committed Aug 14, 2024
1 parent 9d511a0 commit 97a182d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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


28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,30 @@
- **YT Video [How to deploy on Koyeb]**: <https://youtu.be/2m_yB7EllYc>

## 🐳 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
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 97a182d

Please sign in to comment.