Skip to content
This repository was archived by the owner on Dec 29, 2017. It is now read-only.

Commit b5f66dd

Browse files
authored
improve dockerfile (#33)
1 parent be9f5c1 commit b5f66dd

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ WORKDIR /app
77
COPY . .
88
RUN python3 -m pip install .
99

10-
COPY docker.yml /etc/sirbot.yml
10+
COPY config /etc/sirbot
11+
ENV SIRBOT_CONFIG /etc/sirbot/config.yml
12+
13+
VOLUME /var/log/sirbot /etc/sirbot
1114

1215
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
13-
CMD ["/bin/sh", "-c", "sirbot -c /etc/sirbot.yml --update && exec sirbot -c /etc/sirbot.yml"]
16+
CMD ["/bin/sh", "-c", "sirbot --update && exec sirbot"]

docker.yml config/config.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ logging:
1414
level: DEBUG
1515
formatter: simple
1616
stream: ext://sys.stdout
17+
file:
18+
class: logging.handlers.RotatingFileHandler
19+
filename: /var/log/sirbot/sirbot.log
20+
maxBytes: 5242880
21+
backupCount: 7
22+
level: WARNING
23+
formatter: simple
1724
loggers:
1825
sirbot:
1926
level: DEBUG
20-
handlers: [console]
27+
handlers: [file, console]
2128
propagate: no
2229
root:
2330
level: INFO
24-
handlers: [console]
31+
handlers: [file, console]
2532
propagate: no

0 commit comments

Comments
 (0)