Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hg #29

Open
wants to merge 13 commits into
base: snyk-fix-d35b493ed232afb14be359c0a5d5f34e
Choose a base branch
from
Prev Previous commit
Next Next commit
Add Docker
Carlos Villavicencio committed Jun 10, 2020
commit 5475454ac3503f99bcb7d9e0d66073b30edca9c6
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin/
build/
*.db
*.sqlite
.env
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM maven:3-openjdk-11

WORKDIR /usr/app/

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y build-essential

COPY . .

RUN make install

EXPOSE 8080

CMD ["make", "serve"]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -88,6 +88,14 @@ After the above requirements have been met:

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 environmental variables in the `docker-compose.yml` file, see the [Twilio Account Settings](#twilio-account-settings).
3. Run `docker-compose --env-file /dev/null up`.

### Tests

You can run the tests locally by typing:
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.6"
services:
app:
stdin_open: true
tty: true
environment:
- TWILIO_ACCOUNT_SID=your_account_sid
- TWILIO_AUTH_TOKEN=your_account_token
- VERIFICATION_SID=VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
build: .
ports:
- "8080:8080"