Skip to content

Commit

Permalink
git clone included in start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chttrjeankr committed Mar 28, 2020
1 parent eafbd37 commit 42f1536
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__pycache__
.dockerignore
stanford-corenlp-full-2018-10-05/
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM python:3.6
FROM python:3.6-slim-stretch

RUN apt-get update && apt-get install -y git wget unzip

COPY requirements.txt ./requirements.txt
RUN pip install -r requirements.txt

COPY . /usr/var/MapBot
WORKDIR /usr/var/MapBot
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

ENTRYPOINT ["/bin/sh","./docker-entrypoint.sh"]
WORKDIR /usr/var/MapBot
ENTRYPOINT ["/bin/sh","/usr/local/bin/docker-entrypoint.sh"]
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ services:
- java_storage:/usr/local/openjdk-11/

bot:
image: python:3.6
image: chttrje/chatbot
container_name: mapbot_bot
environment:
- DOCKER=Y
build:
context: .
dockerfile: Dockerfile
- GCLOUD_API_KEY
depends_on:
- db
- java
Expand Down
10 changes: 10 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#!/usr/bin/env bash

if [ ! -d MapBot ]; then
git clone https://github.com/vishakha-lall/MapBot.git -b gssoc-master
cd MapBot
else
cd MapBot
git pull
fi

export GCLOUD_API_KEY=<YOUR_API_KEY_HERE>

docker-compose up -d && docker attach mapbot_bot

0 comments on commit 42f1536

Please sign in to comment.