Skip to content

Commit e26b73b

Browse files
committed
Understand volumes
1 parent f21935a commit e26b73b

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Based on tutorial from https://medium.com/@angellom/automatically-building-a-flask-docker-image-on-git-push-with-jenkins-5a30c9fc9beb
2-
Also based on https://blog.jetbrains.com/pycharm/2017/03/docker-compose-getting-flask-up-and-running/
1+
Based on tutorial from https://medium.com/@angellom/automatically-building-a-flask-docker-image-on-git-push-with-jenkins-5a30c9fc9beb
2+
Also based on https://blog.jetbrains.com/pycharm/2017/03/docker-compose-getting-flask-up-and-running/
3+
Understanding volumes: https://container-solutions.com/understanding-volumes-docker/
4+
35

46
Change #1

app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
@app.route('/')
77
def hello_world():
8-
s = 'Flask Dockerized #1 \n' + str(sys.version)
8+
s = "Flask Dockerized Update through volume #1 \n" + str(sys.version)
9+
s += "\n"
10+
with open("test.txt", "r") as f:
11+
for line in f:
12+
s += line
13+
914
return s
1015

1116

docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ version: '3.2'
22
services:
33
web:
44
volumes:
5-
- .:/flask-app
5+
- .:/flask-app:ro

test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original text

0 commit comments

Comments
 (0)