forked from UsergeTeam/Userge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: "3.7" | ||
|
||
services: | ||
userge: | ||
build: | ||
context: https://github.com/UsergeTeam/Userge.git#alpha | ||
depends_on: | ||
- mongo | ||
restart: on-failure | ||
environment: | ||
DATABASE_URL: mongodb://root:example@mongo | ||
env_file: | ||
- config.env | ||
|
||
mongo: | ||
image: mongo | ||
volumes: | ||
- mongo_userge:/data/db | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: root | ||
MONGO_INITDB_ROOT_PASSWORD: example | ||
|
||
volumes: | ||
mongo_userge: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Docker Guide For Userge 🐳 # | ||
|
||
## Install docker ## | ||
- Follow the official docker [installation guide](https://docs.docker.com/engine/install/ubuntu/) | ||
|
||
## Install Docker-compose ## | ||
- Easiest way to install docker-compose is <br> | ||
```sudo pip install docker-compose``` | ||
- Also you can check other official methods of installing docker-compose [here](https://docs.docker.com/compose/install/) | ||
|
||
## Run Userge ## | ||
- We dont need to clone the repo (yeah Docker-compose does that for us) | ||
- Setup configs | ||
- Download the sample config file <br> | ||
- ```mkdir userge && cd userge``` | ||
- ```wget https://raw.githubusercontent.com/UsergeTeam/Userge/alpha/config.env.sample -O config.env``` | ||
- ```vim config.env``` | ||
- Download the yml file for docker-compose | ||
- ```wget https://raw.githubusercontent.com/UsergeTeam/Userge/alpha/resources/docker-compose.yml``` | ||
- Finally start the bot <br> | ||
```docker-compose up -d``` | ||
- The bot should be running now <br> | ||
Check logs with ```docker-compose logs -f``` | ||
|
||
## How to stop the bot ## | ||
- Stop Command | ||
```docker-compose stop``` | ||
- This will just stop the containers. Built images won't be removed. So next time you can start with ``docker-compose start`` command <br> | ||
And it won't take time for building from scratch<br> | ||
|
||
- Down command | ||
```docker-compose down``` | ||
- You will stop and delete the built images also. So next time you have to do ``docker-compose up -d`` to start the bot<br> | ||
|
||
### Q&A ### | ||
- How to see logs <br> | ||
`docker-compose logs -f` | ||
- How to update <br> | ||
`docker-compose up -d` <br> | ||
Changes will be fetched from git repo. You can change repo url from _docker-compose.yml_ file |