You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-35Lines changed: 5 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,46 +8,16 @@ A simple CRUD application using Flask and MySQL
8
8
* MySQL
9
9
* AdminLTE 2
10
10
11
-
### Running server.py
12
-
```
13
-
python3.5 server.py
14
-
15
-
```
16
-
Open http://your-host-ip-address:8181 in browser.
17
-
18
11
### Running on Docker
19
12
20
-
Pull image:
21
-
```
22
-
docker pull muhammadhanif/crud-flask-mysql
23
-
24
13
```
25
-
Run:
14
+
docker-compose up -d
26
15
```
27
-
docker run -it --name crud-flask-mysql -p 80:80 muhammadhanif/crud-flask-mysql
28
-
```
29
-
Open http://your-host-ip-address in browser.
30
-
31
-
Or you can execute the following [docker-compose](https://raw.githubusercontent.com/muhammadhanif/crud-application-using-flask-and-mysql/master/docker-compose/docker-compose.yaml):
32
16
33
-
```
34
-
version: '2'
35
-
services:
17
+
After executing, you will have 2 running cointainers on your Docker host: `phonebook-app` and `phonebook-mysql`. For accessing the web application, open your browser and go to http://your-docker-host-ip-address:8181
36
18
37
-
phonebook-mysql:
38
-
container_name: phonebook-mysql
39
-
image: muhammadhanif/phonebook:mysql
19
+
To destroy the containers, execute:
40
20
41
-
phonebook-flask:
42
-
container_name: phonebook-flask
43
-
image: muhammadhanif/phonebook:flask
44
-
ports:
45
-
- "8181:8181"
46
-
working_dir: /hnf/source_code
47
-
command: python server.py
48
-
links:
49
-
- phonebook-mysql
50
21
```
51
-
52
-
53
-
After executing, you will have 2 running cointainers on your Docker host: phonebook-flask and phonebook-mysql. For accessing the web application, open your browser and go to http://your-docker-host-ip-address:8181
0 commit comments