Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
NoorXd786 authored May 2, 2021
1 parent 8efde2c commit 86707e0
Show file tree
Hide file tree
Showing 14 changed files with 549 additions and 0 deletions.
80 changes: 80 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# We're using Debian Slim Buster image
FROM python:3.8.5-slim-buster

ENV PIP_NO_CACHE_DIR 1

RUN sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list

# Installing Required Packages
RUN apt update && apt upgrade -y && \
apt install --no-install-recommends -y \
debian-keyring \
debian-archive-keyring \
bash \
bzip2 \
curl \
figlet \
git \
util-linux \
libffi-dev \
libjpeg-dev \
libjpeg62-turbo-dev \
libwebp-dev \
linux-headers-amd64 \
musl-dev \
musl \
neofetch \
php-pgsql \
python3-lxml \
postgresql \
postgresql-client \
python3-psycopg2 \
libpq-dev \
libcurl4-openssl-dev \
libxml2-dev \
libxslt1-dev \
python3-pip \
python3-requests \
python3-sqlalchemy \
python3-tz \
python3-aiohttp \
openssl \
pv \
jq \
wget \
python3 \
python3-dev \
libreadline-dev \
libyaml-dev \
gcc \
sqlite3 \
libsqlite3-dev \
sudo \
zlib1g \
ffmpeg \
libssl-dev \
libgconf-2-4 \
libxi6 \
xvfb \
unzip \
libopus0 \
libopus-dev \
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp

# Pypi package Repo upgrade
RUN pip3 install --upgrade pip setuptools

# Copy Python Requirements to /root/ShasaBot
RUN git clone -b shiken https://github.com/MdNoor786/ShasaBot /root/ShasaBot
WORKDIR /root/ShasaBot

#Copy config file to /root/ShasaBott/ShasaBot
COPY ./ShasaBot/sample_config.py ./ShasaBot/config.py* /root/ShasaBot/ShasaBot/

ENV PATH="/home/bot/bin:$PATH"

# Install requirements
RUN pip3 install -U -r requirements.txt

# Starting Worker
CMD ["python3","-m","ShasaBot"]
8 changes: 8 additions & 0 deletions Git_Pull.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
TITLE Github Quick-Pull

:: Print the branch cause ..oooooo fancy!
echo Pulling from branch:
git branch
echo.
git pull
19 changes: 19 additions & 0 deletions Git_Push.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
TITLE Github Quick-pushing

:: Print the branch cause people like me push to wrong branches and cry about it later.
echo Pushing to branch:
git branch
echo.
:: Take input for comment and thats about it
set /p commit_title="Enter Commit title (pushes with you as author): "

:: If you are reading comments to understand this part then you can go back stab yourself.
echo.
git pull
git add *
git commit -m "%commit_title%"
git push


:: Hail Hydra
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
worker: python3 -m ShasaBot
ps:scale worker=1
6 changes: 6 additions & 0 deletions Setup venv.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TITLE Setting up virtual env
:: Running it once is fine, this just sets up virtual env >> install all modules there
py -m venv env && env\scripts\activate.bat && pip install -r requirements.txt

:: Note to rerun the requirements.txt in case you ever add a mdoule.
:: Running this multiple time will not make a mess of your setup, dont worry about that bit.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-architect
2 changes: 2 additions & 0 deletions exp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sudo bash -c 'echo "{ \"cgroup-parent\": \"/actions_job\",\"experimental\":true}" > /etc/docker/daemon.json'
sudo systemctl restart docker.service
5 changes: 5 additions & 0 deletions heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
docker:
worker: Dockerfile
run:
worker: python3 -m ShasaBot
Loading

0 comments on commit 86707e0

Please sign in to comment.