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

Add Dockerfile to help for running tests #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/__pycache__
/routes/__pycache__
/routes/__pycache__
.history/*
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:18.10

RUN apt-get update -y && \
apt-get install -y python3-pip python3-dev

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app
ADD . /app

RUN pip3 install -r requirements.txt

ENTRYPOINT [ "python3" ]

CMD [ "app.py" ]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ $ python3 app.py
$ python3 tests/test_app.py
```

## Usage
1. Install Docker and clone this repository.
2. Launch a terminal where Dockerfile exists and run:
```bash
$ docker build -t simplemath-flask .
$ docker run -itd simplemath-flask
```
3. To stop the Docker container
```bash
$ docker stop simplemath-flask
```
4. After installation you can access the web via http://localhost:5000/math/check

## Contributing
To start contributing, check out [CONTRIBUTING.md](https://github.com/mayankshah1607/SimpleMath-NodeJS/blob/master/CONTRIBUTING.md). New contributors are always welcome to support this project. Check out issues labelled as `Hacktoberfest` if you are up for some grabs! :)

Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
app.register_blueprint(router, url_prefix="/math")

if __name__ == '__main__':
app.run(port=PORT)
app.run(host='0.0.0.0', port=PORT, debug=False)