This repository was archived by the owner on Dec 29, 2017. It is now read-only.
File tree 5 files changed +45
-6
lines changed
5 files changed +45
-6
lines changed Original file line number Diff line number Diff line change
1
+ . *
2
+ __pycache__ /
3
+ build /
4
+ dist /
5
+ icon /
6
+ * .egg-info /
Original file line number Diff line number Diff line change 1
1
language : python
2
2
3
+ services :
4
+ - docker
5
+
3
6
python :
4
7
- ' 3.5'
5
8
- ' 3.6'
@@ -21,6 +24,7 @@ script:
21
24
- python setup.py doc
22
25
- python setup.py sdist
23
26
- python setup.py bdist_wheel
27
+ - docker build . -t pyslackers/sir-bot-a-lot
24
28
25
29
deploy :
26
30
- provider : script
Original file line number Diff line number Diff line change 1
1
FROM python:3.6-alpine
2
2
3
- ENV PYTHONPATH=./.pip:/app/.pip:.: \
4
- DOCKER=True
5
- COPY . /app/
6
- RUN python3 -m pip install -r /app/requirements/requirements.txt -t /app/.pip
7
-
3
+ RUN apk add --update --no-cache gcc g++ && pip install dumb-init
8
4
9
5
WORKDIR /app
10
6
11
- CMD ["python" , "./run.py" ]
7
+ COPY . .
8
+ RUN python3 -m pip install .
9
+
10
+ COPY docker.yml /etc/sirbot.yml
11
+
12
+ ENTRYPOINT ["/usr/local/bin/dumb-init" , "--" ]
13
+ CMD ["/bin/sh" , "-c" , "sirbot -c /etc/sirbot.yml --update && exec sirbot -c /etc/sirbot.yml" ]
Original file line number Diff line number Diff line change
1
+ sirbot :
2
+ port : 8080
3
+ plugins : []
4
+
5
+ logging :
6
+ version : 1
7
+ disable_existing_loggers : false
8
+ formatters :
9
+ simple :
10
+ format : ' %(asctime)s - %(name)s - %(levelname)s - %(message)s'
11
+ handlers :
12
+ console :
13
+ class : logging.StreamHandler
14
+ level : DEBUG
15
+ formatter : simple
16
+ stream : ext://sys.stdout
17
+ loggers :
18
+ sirbot :
19
+ level : DEBUG
20
+ handlers : [console]
21
+ propagate : no
22
+ root :
23
+ level : INFO
24
+ handlers : [console]
25
+ propagate : no
Original file line number Diff line number Diff line change @@ -227,13 +227,15 @@ async def update(self):
227
227
Trigger the update method of the plugins. This is needed if the plugins
228
228
need to perform update migration (i.e database)
229
229
"""
230
+ logger .info ('Updating Sir Bot-a-lot' )
230
231
for name , plugin in self ._plugins .items ():
231
232
plugin_update = getattr (plugin ['plugin' ], 'update' , None )
232
233
if callable (plugin_update ):
233
234
logger .info ('Updating %s' , name )
234
235
await plugin_update (self .config .get (name , {}), self ._plugins )
235
236
logger .info ('%s updated' , name )
236
237
self ._session .close ()
238
+ logger .info ('Sir Bot-a-lot updated' )
237
239
238
240
@property
239
241
def app (self ) -> web .Application :
You can’t perform that action at this time.
0 commit comments