Skip to content

Commit a5f61ee

Browse files
committed
add functional scripts
1 parent 2cfffe0 commit a5f61ee

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

scripts/start.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
export PROJECT_NAME=rssbot
4+
export PYTHONPATH=${PYTHONPATH}:$(pwd)
5+
6+
echo "PYTHONPATH"
7+
echo ${PYTHONPATH}
8+
9+
echo "====================================================="
10+
echo ""
11+
echo " Setup"
12+
echo ""
13+
echo "====================================================="
14+
15+
python ./${PROJECT_NAME}/main.py --setup
16+
17+
echo "====================================================="
18+
echo ""
19+
echo " Start"
20+
echo ""
21+
echo "====================================================="
22+
23+
gunicorn ${PROJECT_NAME}.wsgi:app --bind 0.0.0.0:${PORT} --log-file - --reload --worker-class aiohttp.worker.GunicornWebWorker

scripts/test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
docker-compose run bot py.test

scripts/tunnel.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
PORT=${1}
4+
5+
if [ -z "$PORT" ]; then
6+
echo Please specify port value or your bot server.
7+
echo
8+
echo For example. If your bot exposes 8080 port you should run:
9+
echo ./tunnel.sh 8080
10+
echo
11+
exit 1
12+
fi
13+
14+
ngrok http $(docker-machine ip $(docker-machine active)):${PORT}

0 commit comments

Comments
 (0)