Skip to content

Commit

Permalink
Add Docker support (#393)
Browse files Browse the repository at this point in the history
* Implements Docker and Docker Compose support

* Update the README file with usage instructions
* Add the files Dockerfile, docker-compose.yml and .dockerignore

* Change Docker image version from 0.1.0 to latest
  • Loading branch information
lucasvalenteds authored and joeblau committed Feb 24, 2018
1 parent 88a2dcd commit 96414ba
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Packages
.build

12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM vapor/vapor:1.0.9-xenial

WORKDIR /app

COPY ./ ./

RUN vapor build

EXPOSE 8080

# CMD vapor run

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]:joeblau/gitignore.io.git
$ cd gitignore.io/
$ docker-compose up -d
```

## Companies

Here are some companies that use gitignore.io:
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.5"

services:
app:
image: gitignore-io:latest
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
command: vapor run

0 comments on commit 96414ba

Please sign in to comment.