Skip to content

Commit 94e11fa

Browse files
committed
update readme
1 parent ff39faf commit 94e11fa

File tree

5 files changed

+34
-1
lines changed

5 files changed

+34
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Posts and associated code:
77

88
|Post|Code Directory|
99
|---|---|
10+
|[Running Bottle Apps in Docker Containers on macOS](https://www.fullstackpython.com/blog/first-steps-bottle-web-apps-docker-containers.html)|[docker-bottle-mac](./docker-bottle-mac)|
1011
|[How to Add Maps to Django Web App Projects with Mapbox](https://www.fullstackpython.com/blog/maps-django-web-applications-projects-mapbox.html)|[maps-django-mapbox](./maps-django-mapbox)|
1112
|[Full Stack Python at PyCon US 2018](https://www.fullstackpython.com/blog/full-stack-python-pycon-us-2018.html)|No code in post.|
1213
|[Monitoring Python 3.6 Code on AWS Lambda](https://www.fullstackpython.com/blog/monitor-python-3-6-example-code-aws-lambda-rollbar.html)|[monitor-aws-lambda-python-3-6](./monitor-aws-lambda-python-3-6)|

docker-bottle-mac/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# this is an official Python runtime, used as the parent image
2+
FROM python:3.6.5-slim
3+
4+
# set the working directory in the container to /app
5+
WORKDIR /app
6+
7+
# add the current directory to the container as /app
8+
ADD . /app
9+
10+
# execute everyone's favorite pip command, pip install -r
11+
RUN pip install --trusted-host pypi.python.org -r requirements.txt
12+
13+
# unblock port 8080 for the Bottle app to run on
14+
EXPOSE 8080
15+
16+
# execute the Bottle app
17+
CMD ["python", "app.py"]

docker-bottle-mac/app.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import bottle
2+
from bottle import route, run
3+
4+
5+
app = bottle.default_app()
6+
7+
8+
@route('/')
9+
def hello_world():
10+
return "Hello, world! (From Full Stack Python)"
11+
12+
13+
if __name__ == '__main__':
14+
run(host="0.0.0.0", port=8080, debug=True, reloader=True)

docker-bottle-mac/requirements.txt

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

docker-flask-mac/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
flask==0.12.2
1+
flask==1.0.2

0 commit comments

Comments
 (0)