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

Update tutorials #66

Closed
wants to merge 1 commit into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 22 additions & 18 deletions docs/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Instead modify the rundoc script and re-run it.

Command: /Users/rschneeman/.gem/ruby/3.3.1/bin/rundoc docs/src/python/RUNDOC.md
Command: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/bin/rundoc docs/src/python/RUNDOC.md
STOP -->

# Heroku Python Cloud Native Buildpack (CNB) Tutorial
Expand Down Expand Up @@ -95,7 +95,12 @@ $ cd python-getting-started
Verify you're in the correct directory:

```
$ ls
$ ls -A
.env
.git
.github
.gitignore
.python-version
Procfile
Procfile.windows
README.md
Expand Down Expand Up @@ -161,15 +166,15 @@ Collecting packaging (from gunicorn<24,>=23->-r requirements.txt (line 2))
Collecting typing-extensions>=3.10.0.0 (from dj-database-url<3,>=2->-r requirements.txt (line 3))
Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting brotli (from whitenoise[brotli]<7,>=6->-r requirements.txt (line 4))
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (5.5 kB)
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
Downloading Django-5.1.4-py3-none-any.whl (8.3 MB)
Downloading gunicorn-23.0.0-py3-none-any.whl (85 kB)
Downloading dj_database_url-2.3.0-py3-none-any.whl (7.8 kB)
Downloading whitenoise-6.8.2-py3-none-any.whl (20 kB)
Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)
Downloading sqlparse-0.5.3-py3-none-any.whl (44 kB)
Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB)
Downloading Brotli-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)
Downloading packaging-24.2-py3-none-any.whl (65 kB)
Installing collected packages: brotli, whitenoise, typing-extensions, sqlparse, packaging, asgiref, gunicorn, django, dj-database-url
Successfully installed asgiref-3.8.1 brotli-1.1.0 dj-database-url-2.3.0 django-5.1.4 gunicorn-23.0.0 packaging-24.2 sqlparse-0.5.3 typing-extensions-4.12.2 whitenoise-6.8.2
Expand All @@ -194,7 +199,7 @@ Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving my-image-name...
*** Images (415ff36d098a):
*** Images (a1fc0ebaf7cc):
my-image-name
Adding cache layer 'heroku/python:pip'
Adding cache layer 'heroku/python:pip-cache'
Expand All @@ -210,7 +215,7 @@ Verify that you see “Successfully built image my-image-name” at the end of t

```
$ docker image ls --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" | grep my-image-name
415ff36d098a my-image-name latest
a1fc0ebaf7cc my-image-name latest
```
<!-- STOP. This document is autogenerated. Do not manually modify. See the top of the doc for more details. -->
## What does `pack build` do?
Expand Down Expand Up @@ -247,10 +252,10 @@ By default, images will be booted into a web server configuration. You can launc

```
$ docker run -it --rm --env PORT=5006 -p 5006:5006 my-image-name
[2024-12-14 23:31:10 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2024-12-14 23:31:10 +0000] [1] [INFO] Listening at: http://[::]:5006 (1)
[2024-12-14 23:31:10 +0000] [1] [INFO] Using worker: gthread
[2024-12-14 23:31:10 +0000] [11] [INFO] Booting worker with pid: 11
[2024-12-17 21:00:09 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2024-12-17 21:00:09 +0000] [1] [INFO] Listening at: http://[::]:5006 (1)
[2024-12-17 21:00:09 +0000] [1] [INFO] Using worker: gthread
[2024-12-17 21:00:09 +0000] [11] [INFO] Booting worker with pid: 11
```
<!-- STOP. This document is autogenerated. Do not manually modify. See the top of the doc for more details. -->

Expand Down Expand Up @@ -282,7 +287,12 @@ $ docker run -it --rm my-image-name bash
Now you can inspect the container interactively. For example, you can see the files on disk with `ls`:

```
$ ls
$ ls -A
.env
.git
.github
.gitignore
.python-version
Procfile
Procfile.windows
README.md
Expand Down Expand Up @@ -361,16 +371,10 @@ Most buildpacks rely on existing community standards to allow you to configure y

The `Procfile` is a configuration file format that was [introduced by Heroku in 2011](https://devcenter.heroku.com/articles/procfile), you can now use this behavior on your CNB-powered application via the `heroku/procfile`, which like the rest of the buildpacks in our builder [is open source](https://github.com/heroku/buildpacks-procfile). The `heroku/procfile` buildpack allows you to configure your web startup process.

This is the `Procfile` of the getting started guide:
This is the `web` entry in the getting started guide's `Procfile`:

```
web: gunicorn --config gunicorn.conf.py gettingstarted.wsgi

# Uncomment this `release` process if you are using a database, so that Django's model
# migrations are run as part of app deployment, using Heroku's Release Phase feature:
# https://docs.djangoproject.com/en/5.1/topics/migrations/
# https://devcenter.heroku.com/articles/release-phase
#release: ./manage.py migrate --no-input
```
<!-- STOP. This document is autogenerated. Do not manually modify. See the top of the doc for more details. -->

Expand Down
Binary file modified docs/python/screenshots/screenshot_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/dotenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'dotenv' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('dotenv', 'dotenv', version)
else
gem "dotenv", version
load Gem.bin_path("dotenv", "dotenv", version)
end
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/jmespath.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'jmespath' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('jmespath', 'jmespath.rb', version)
else
gem "jmespath", version
load Gem.bin_path("jmespath", "jmespath.rb", version)
end
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/nokogiri
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'nokogiri' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('nokogiri', 'nokogiri', version)
else
gem "nokogiri", version
load Gem.bin_path("nokogiri", "nokogiri", version)
end
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/racc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'racc' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('racc', 'racc', version)
else
gem "racc", version
load Gem.bin_path("racc", "racc", version)
end
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/rundoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'rundoc' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('rundoc', 'rundoc', version)
else
gem "rundoc", version
load Gem.bin_path("rundoc", "rundoc", version)
end
29 changes: 29 additions & 0 deletions vendor/bundle/ruby/3.3.0/bin/thor
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
#
# This file was generated by RubyGems.
#
# The application 'thor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

Gem.use_gemdeps

version = ">= 0.a"

str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('thor', 'thor', version)
else
gem "thor", version
load Gem.bin_path("thor", "thor", version)
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added vendor/bundle/ruby/3.3.0/cache/dotenv-3.1.6.gem
Binary file not shown.
Binary file not shown.
Binary file added vendor/bundle/ruby/3.3.0/cache/logger-1.6.3.gem
Binary file not shown.
Binary file added vendor/bundle/ruby/3.3.0/cache/matrix-0.4.2.gem
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added vendor/bundle/ruby/3.3.0/cache/rack-3.1.8.gem
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
current directory: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
/opt/hostedtoolcache/Ruby/3.3.6/x64/bin/ruby extconf.rb
creating Makefile

current directory: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20241217-2671-3l0hum sitelibdir\=./.gem.20241217-2671-3l0hum clean

current directory: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20241217-2671-3l0hum sitelibdir\=./.gem.20241217-2671-3l0hum
compiling cparse.c
linking shared-object racc/cparse.so

current directory: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20241217-2671-3l0hum sitelibdir\=./.gem.20241217-2671-3l0hum install
/usr/bin/install -c -m 0755 cparse.so ./.gem.20241217-2671-3l0hum/racc

current directory: /home/runner/work/buildpacks/buildpacks/vendor/bundle/ruby/3.3.0/gems/racc-1.8.1/ext/racc/cparse
make DESTDIR\= sitearchdir\=./.gem.20241217-2671-3l0hum sitelibdir\=./.gem.20241217-2671-3l0hum clean
Binary file not shown.
Loading
Loading