Skip to content

Commit

Permalink
Added Dockerfile and updated Readme with instructions (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett McGinnis authored and JohnTheodore committed Mar 7, 2019
1 parent 024c086 commit 7625d36
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
py36*
audit.log
whitelist.txt
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python

WORKDIR /build

COPY . .

RUN pip install -r requirements.txt

ENV SLACK_TOKEN='SET_THIS'
ENV DRY_RUN=true

CMD SLACK_TOKEN=${SLACK_TOKEN} \
DRY_RUN=${DRY_RUN} \
python slack-autoarchive.py
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ To provide a custom message, simply edit `messages.json`.
## Known Issues

- Since slack doesn't have a batch API, we have to hit the api a couple times for each channel. This makes the performance of this script slow. If you have thousands of channels (which some people do), get some coffee and be patient.

## Docker

- First build the docker image (in the root of the project)

`docker build --tag autoarchive .`
- run the container (dryrun is set to true by default)

`docker run -e SLACK_TOKEN=<YOUR_AWESOME_TOKEN> autoarchive`
- if your ready to archive run

`docker run -e SLACK_TOKEN=<YOUR_AWESOME_TOKEN> -e DRY_RUN=false autoarchive`

0 comments on commit 7625d36

Please sign in to comment.