From f20825a96f98371a6b50d7e6d5812c0d866ac6cd Mon Sep 17 00:00:00 2001 From: keenborder786 <21110290@lums.edu.pk> Date: Fri, 26 May 2023 02:29:35 +0500 Subject: [PATCH] [docs/chore]: docker-compose added and read-me updated --- README.md | 12 +++++++++++- docker-compose.yml | 14 ++++++++++++++ dockerfile | 5 +++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index f8adba2..4e731ec 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # Upwork SlackBot -## TO-DO \ No newline at end of file +## Get SLACK_BOT_TOKEN and SLACK_APP_TOKEN + + +## Update the ENV variables in docker-compose + + +## Run the Bot + +``` +docker-compose up +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..da16748 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + upwork_slackbot: + image: upwork_slackbot:1.0 + build: + context: . + dockerfile: Dockerfile + environment: + - CONSUMER_KEY="" + - CONSUMER_SECRET="" + - QUERY=Python + - SLACK_BOT_TOKEN="" + - SLACK_APP_TOKEN="" + - CHANNEL_ID=C05856EUC8L \ No newline at end of file diff --git a/dockerfile b/dockerfile index 70fa98c..5961b4f 100644 --- a/dockerfile +++ b/dockerfile @@ -23,7 +23,8 @@ RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/so # Install Chrome RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -RUN apt-get install ./google-chrome-stable_current_amd64.deb +RUN apt-get update +RUN apt-get -y install ./google-chrome-stable_current_amd64.deb # Copy all the relevant Files COPY slack_bot/ /opt/upwork_slackbot/slack_bot/ @@ -31,5 +32,5 @@ COPY upwork_bot/ /opt/upwork_slackbot/upwork_bot/ COPY config.py /opt/upwork_slackbot/config.py COPY main.py /opt/upwork_slackbot/main.py -ENTRYPOINT ["/opt/conda/envs/upwork_scrapper/bin/python","-u", "/opt/upwork_scrapper/main.py"] +ENTRYPOINT ["/opt/conda/envs/upwork_scrapper/bin/python","-u", "/opt/upwork_slackbot/main.py"]