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

Modify README and Dockerfile #32

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
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y python python-pip
FROM ubuntu
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip install flask
COPY app.py /opt/
COPY app.py /opt/app.py
ENTRYPOINT FLASK_APP=/opt/app.py flask run --host=0.0.0.0 --port=8080
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,21 @@ This is used in the demonstration of development of Ansible Playbooks.
## 1. Install all required dependencies

Python and its dependencies

apt-get install -y python python-setuptools python-dev build-essential python-pip python-mysqldb
```bash
apt-get update
apt-get install -y python3
apt-get install -y python3-pip
```


## 2. Install and Configure Web Server

Install Python Flask dependency

pip install flask
pip install flask-mysql
```bash
pip install flask
pip install flask-mysql
```

- Copy app.py or download it from source repository
- Configure database credentials and parameters
Expand All @@ -30,8 +35,10 @@ Install Python Flask dependency

Start web server

FLASK_APP=app.py flask run --host=0.0.0.0

```bash
FLASK_APP=app.py flask run --host=0.0.0.0
```

## 4. Test

Open a browser and go to URL
Expand Down