diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..93f1361 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f50a3b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM node:10 + +WORKDIR /usr/src/app + +COPY package*.json ./ + +RUN npm install + +COPY . . + +EXPOSE 3000 + +CMD [ "npm", "start" ] diff --git a/README.md b/README.md index 82147a9..dc1cc7c 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,16 @@ Voice "REQUEST URL" to be your ngrok URL plus `/voice`. For example: That's it! +### Docker + +If you have [Docker](https://www.docker.com/) already installed on your machine, you can use our `docker-compose.yml` to setup your project. + +1. Make sure you have the project cloned. +2. Setup the `.env` file as outlined in the [Local Development](#local-development) steps. +3. Run `docker-compose up`. +4. Follow the steps in [Local Development](#local-development) on how to expose your port to Twilio using a tool like [ngrok](https://ngrok.com/) and configure the remaining parts of your application. + + ### Tests To execute tests, run the following command in the project directory: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c51e1b4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.8" +services: + app: + restart: always + build: . + ports: + - "3000:3000"