-
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.
Post screenshots; new deployment method
* working on screenshots * progress * add tests * python dependencies do not install in container * stuff * asdf * new deploymeny method * still need rate limit handling
- Loading branch information
Showing
10 changed files
with
241 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
ord_bot/__pycache__/ | ||
ord_bot/credentials.py | ||
*.png |
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
apt-get update --yes && apt-get upgrade --yes | ||
apt-get install --yes build-essential \ | ||
zlib1g-dev \ | ||
libncurses5-dev \ | ||
libgdbm-dev \ | ||
libnss3-dev \ | ||
libssl-dev \ | ||
libreadline-dev \ | ||
libffi-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
libbz2-dev \ | ||
acl \ | ||
clang \ | ||
pkg-config \ | ||
software-properties-common \ | ||
ufw \ | ||
vim | ||
|
||
if ! command -v python3.10 &> /dev/null; then | ||
wget https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz | ||
tar -xf Python-3.10.*.tgz | ||
cd Python-3.10.*/ | ||
./configure --enable-optimizations | ||
make altinstall | ||
python3.10 -m ensurepip --upgrade | ||
fi | ||
|
||
if ! command -v google-chrome &> /dev/null; then | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
apt-get install -y ./google-chrome-stable_current_amd64.deb && apt-get install -fy | ||
fi | ||
|
||
if ! command -v chromedriver &> /dev/null; then | ||
wget https://chromedriver.storage.googleapis.com/109.0.5414.74/chromedriver_linux64.zip | ||
unzip chromedriver_linux64.zip | ||
mv chromedriver /usr/bin/chromedriver | ||
chown root:root /usr/bin/chromedriver | ||
chmod +x /usr/bin/chromedriver | ||
fi | ||
|
||
pip3.10 install --upgrade setuptools pip | ||
|
||
# id --user ord_bot || useradd --system ord_bot | ||
# chown -R ord_bot:ord_bot /var/lib/ord_bot | ||
|
||
cp ord_bot.service /etc/systemd/system/ | ||
systemctl daemon-reload | ||
systemctl enable ord_bot | ||
systemctl restart ord_bot |
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,19 @@ | ||
[Unit] | ||
After=network.target | ||
Description=ord_bot | ||
StartLimitBurst=120 | ||
StartLimitIntervalSec=10m | ||
|
||
[Service] | ||
User=root | ||
WorkingDirectory=/var/lib/ord_bot | ||
ExecStart=/usr/local/bin/pipenv run python3.10 /var/lib/ord_bot/ord_bot.py | ||
Restart=on-failure | ||
RestartSec=5s | ||
StandardOutput=syslog+console | ||
StandardError=syslog+console | ||
TimeoutStopSec=10m | ||
Type=simple | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
Oops, something went wrong.