@@ -9,4 +9,5 @@ ADD templates/ /rollbot/templates
ADD config/config.toml /rollbot
ADD config/secrets.toml /rollbot
ADD src/ /rollbot
-CMD ["gunicorn", "rollbot:app", "--bind", "0.0.0.0:6070", "--workers", "9"]
+# CMD ["gunicorn", "rollbot:app", "--bind", "0.0.0.0:6070", "--workers", "9"]
+CMD ["python3", "app.py"]
@@ -1,12 +1,9 @@
+database = "/tmp/rollbot.sqlite"
+
[plugins]
simple = [ "info", "isadmin", "debug", "echo", "thanks", "guess", "meme", "unmeme", "greet", "console" ]
teamspeak = [ "teamspeak" ]
-[postgres]
-host = "db"
-user = "postgres"
-db = "postgres"
-
[teamspeak]
host = "kirkleon.ddns.net"
user = "serveradmin"
@@ -9,8 +9,5 @@ global = [ ] # List of Global Admin User IDs
[bots]
your_chat = "BOT-TOKEN"
-pass = "rollbotpostgres"
pass = "your-teamspeak-serveradmin-password"
@@ -1,6 +1,5 @@
toml
sqlalchemy
-psycopg2-binary
Flask
gunicorn
requests
@@ -83,4 +83,4 @@ def execute():
if __name__ == "__main__":
# default deployment in debug mode
- app.run(host="0.0.0.0", port=6071, debug=True)
+ app.run(host="0.0.0.0", port=6070)
@@ -31,4 +31,4 @@ GLOBAL_ADMINS = get_secret("auths.global")
GROUP_ADMINS = get_secret("auths.group")
PLUGINS = get_config("plugins")
API_KEY = get_secret("api_key")
-POSTGRES = f'{get_config("postgres.user")}:{get_secret("postgres.pass")}@{get_config("postgres.host")}/{get_config("postgres.db")}'
+DB_FILE = os.path.abspath(get_config("database"))
@@ -3,10 +3,11 @@ from contextlib import contextmanager
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
-from config import POSTGRES
+from config import DB_FILE
from command_system import ModelBase
-engine = create_engine("postgresql://" + POSTGRES)
+engine = create_engine("sqlite:///" + DB_FILE)
Session = sessionmaker(bind=engine)
@@ -1,18 +0,0 @@
-version: "3.1"
-services:
- rollbot:
- build: .
- ports:
- - "6071:6070"
- restart: always
- depends_on:
- - "db"
- command: [ "python3", "app.py" ]
- db:
- image: postgres
- environment:
- POSTGRES_PASSWORD: rollbotpostgres
@@ -1,29 +0,0 @@
- networks:
- hiramnet:
- ipv4_address: "172.18.0.22"
- default: {}
- volumes:
- - "/opt/rollbot/data/postgres:/var/lib/postgresql/data"
- - default
-networks:
- external: true