Add Docker support (#393)

* 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
This commit is contained in:
lucasvalenteds
2018-02-24 16:14:47 -03:00
committed by Joe Blau
parent 88a2dcd990
commit 96414babf9
4 changed files with 36 additions and 0 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
Packages
.build

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM vapor/vapor:1.0.9-xenial
WORKDIR /app
COPY ./ ./
RUN vapor build
EXPOSE 8080
# CMD vapor run

View File

@@ -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:

11
docker-compose.yml Normal file
View File

@@ -0,0 +1,11 @@
version: "3.5"
services:
app:
image: gitignore-io:latest
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
command: vapor run