Skip to content

Commit d5e7e1b

Browse files
add docker
1 parent 52feacc commit d5e7e1b

12 files changed

+25
-8
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.DS_Store
22
user
3+
*pyc
4+
users.db

CHANGELOG.md

-2
This file was deleted.

ChordProToPDF.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
app = Flask(__name__)
1919

20-
port = int(os.getenv('PORT', 8080))
20+
port = int(os.getenv('PORT', 80))
2121

2222
f = open('Akkorde.csv', 'rU')
2323
fline = f.readline().replace('\n','')
@@ -127,4 +127,4 @@ def logout():
127127

128128
if __name__ == "__main__":
129129
app.secret_key = os.urandom(12)
130-
app.run(host ="0.0.0.0", port = port, debug=True) #host ="0.0.0.0",
130+
app.run(host ="0.0.0.0", port = port, debug=False) #host ="0.0.0.0",

Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:2.7-buster
2+
3+
RUN mkdir /ChordPro-master
4+
5+
COPY . /ChordPro-master
6+
7+
WORKDIR /ChordPro-master
8+
9+
RUN pip install -r requirements.txt
10+
11+
ENTRYPOINT python ChordProToPDF.py

Procfile

100755100644
File mode changed.

README.md

100755100644
+6
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ Create your own, beautiful looking, one paged song sheets
2323
6. Access the running app in a browser at http://localhost:8080
2424
7. Log in (default user: admin, password: admin)
2525
8. Select **Man of sorrows - C.rtf** from the samples directory
26+
27+
## Run app locally with docker:
28+
29+
1. Install docker
30+
2. `docker build -t chordpro .`
31+
3. `docker run -d -p 8080:80 --name chordpro --rm chordpro`

create_song.pyc

-6.24 KB
Binary file not shown.

create_users.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Session = sessionmaker(bind=engine)
1212
session = Session()
1313

14-
user = User("admin",sha256_crypt.encrypt('admin'))
14+
user = User("sven",sha256_crypt.encrypt('Ch0rdPr0'))
1515
session.add(user)
1616

1717
# commit the record the database

manifest.yml

100755100644
+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ applications:
22
- path: .
33
memory: 128M
44
instances: 1
5-
domain: mybluemix.net
5+
#domain: bluemix.net
66
name: chordpro
7-
host: chord-pro
7+
host: chordpro
88
disk_quota: 1024M

requirements.txt

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Flask==0.11.1
1+
Flask==1.0.0
22
cf-deployment-tracker==1.0.2
33
reportlab
44
pyth

tabledef.pyc

-1.24 KB
Binary file not shown.

users.db

-8 KB
Binary file not shown.

0 commit comments

Comments
 (0)