Improved docker support for deployment #70
This commit is contained in:
@@ -8,7 +8,7 @@ volumes:
|
||||
services:
|
||||
kdb_bot_staging_1:
|
||||
image: kdb-bot/kdb-bot:0.3
|
||||
container_name: kdb_staging_1
|
||||
container_name: kdb_bot_staging_1
|
||||
depends_on:
|
||||
- kdb_db_staging_1
|
||||
volumes:
|
||||
@@ -19,7 +19,8 @@ services:
|
||||
KDB_PREFIX: "!kt "
|
||||
restart: 'no'
|
||||
ports:
|
||||
- '8043:80'
|
||||
- '8044:80'
|
||||
command: bash /app/bot/bot -stage
|
||||
|
||||
kdb_web_staging_1:
|
||||
image: kdb-web/kdb-web:0.3
|
||||
@@ -30,7 +31,7 @@ services:
|
||||
- kdb_web_staging_1:/app
|
||||
restart: 'no'
|
||||
ports:
|
||||
- '8044:80'
|
||||
- '8043:80'
|
||||
|
||||
kdb_db_staging_1:
|
||||
image: mysql:latest
|
||||
|
@@ -13,5 +13,6 @@ RUN apk add bash
|
||||
RUN apk add nano
|
||||
|
||||
RUN pip install -r requirements.txt --extra-index-url https://pip.sh-edraft.de
|
||||
RUN pip install flask[async]
|
||||
|
||||
CMD [ "bash", "/app/bot/bot"]
|
||||
|
@@ -51,7 +51,7 @@ class Api(Flask):
|
||||
self.error_handler_spec[None][code][exc_class] = self.handle_exception
|
||||
|
||||
# websockets
|
||||
self._socketio = SocketIO(self, cors_allowed_origins='*')
|
||||
self._socketio = SocketIO(self, cors_allowed_origins='*', path='/api/socket.io')
|
||||
self._socketio.on_event('connect', self.on_connect)
|
||||
self._socketio.on_event('disconnect', self.on_disconnect)
|
||||
|
||||
|
Reference in New Issue
Block a user