From a4b15af866553819b4d57c3ce0031f7256236570 Mon Sep 17 00:00:00 2001 From: Raymond Bernardo Date: Mon, 31 May 2021 16:50:29 -0400 Subject: [PATCH] Add docker environment --- Dockerfile | 16 ++++++++++++++++ README.md | 12 +++++++++++- docker-compose.yml | 8 ++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b5954c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3 + +WORKDIR /plane + +COPY . . + +# Add pipenv +RUN pip install pipenv + +# Install dependencies +RUN pipenv install + +# Added needed folder for plane-notify process +RUN mkdir /var/run/plane-notify + +CMD pipenv run python __main__ diff --git a/README.md b/README.md index 7bfd82b..9249790 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,19 @@ screen -R ### Start Program ```bash -pipenv run __main__ +pipenv run python __main__ ``` +## Using with Docker + +Install [docker from their website](https://docs.docker.com/get-docker/). Run the following command from the root of the project. + +``` +docker-compose up -d +``` + +After running this command, dut to the `-d` flag the container will be running in the background. To see the logs of the docker + ### TODO - General Cleanup diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2adc5d3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3.9" +services: + plane-notify: + command: sh -c "sleep 500" + build: + context: . + volumes: + - ./:/plane