diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..16edde7b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +Packages +.build + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..1995ee96 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM vapor/vapor:1.0.9-xenial + +WORKDIR /app + +COPY ./ ./ + +RUN vapor build + +EXPOSE 8080 + +# CMD vapor run + diff --git a/README.md b/README.md index 9070a11a..768a0059 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,16 @@ $ vapor build $ vapor run ``` +### Using Docker + +It's also possible to run the app using [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/). It can be done by running the commands below. + +```sh +$ git clone --recursive git@github.com:joeblau/gitignore.io.git +$ cd gitignore.io/ +$ docker-compose up -d +``` + ## Companies Here are some companies that use gitignore.io: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..4ed18c31 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.5" + +services: + app: + image: gitignore-io:latest + build: + context: ./ + dockerfile: Dockerfile + ports: + - "8080:8080" + command: vapor run