Skip to content

[Django + Flask] Getting Started Frameworks section for Upsun #3816

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

Merged
merged 18 commits into from
Apr 3, 2024

Conversation

gilzow
Copy link
Collaborator

@gilzow gilzow commented Feb 29, 2024

This is a WIP/demo PR

Per conversation with Chad, demo PR of a reworked frameworks getting started section.

The idea is that the Frameworks section should include the required steps for a framework that are not covered by the general Getting Started guide. This way, if a user navigates to this section (e.g. "Deploying Drupal on Upsun") they should have the steps/items they need to accomplish the goal of deploying on Upsun for that framework without being taken away from the docs to a blog post. The blog posts then can focus on more niche items that are not appropriate for the documentation (e.g. setting up celerey on Upsun for Django).

What I don't like so far in this demo: we need a better, consistent method for organizing remaining steps and structure on how much additional information we include. In this demo, there are six remaining steps. I chose to organize by where the steps need to occur (.environment vs .upsun/config.yaml) but perhaps it needs to be an ordered list, one for each step?

For the first step (changes to.environment), I included information about why the environment variables are needed. Perhaps we don't need to include this information and we can instead assume that someone familiar with a framework already knows what the items are and simply needs to know where to include them?

@gilzow gilzow added WIP docs rework For issues about updating the docs to the new style and content model (see the project for more) labels Feb 29, 2024
Copy link

Your Platform.sh environment has successfully deployed. 🚀

See the site:
https://getting-started-demo-c6quj6q-ucq44jg6ofare.eu-5.platformsh.site/

```
to:
```yaml
deploy: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you need to display all top level keys above, like;

applications:
    app:
        hooks:
            deploy: |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and same for all other YAML snippets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's the challenging part with yaml. do our code samples include the correct indentation according to where the keys we're changing are located so if someone copies and pastes they get the right indentation (assuming they're using 2 spaces per indent)? Or do we include the entire path (ie applications:<app-name>:hooks) and assume the user knows that they cant copy and paste the whole block?

I don't have a good answer.

to

```yaml
mounts:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is different...

@flovntp
Copy link
Contributor

flovntp commented Mar 1, 2024

so, if it's an amendment to @chadwcarlson's Django blogpost, why don't you just change the snippets in the blogpost itself?
or, maybe add a note in the blogpost with the link to this page?

@gilzow
Copy link
Collaborator Author

gilzow commented Mar 5, 2024

@flovntp this is a demonstration of an idea i pitched to Chad. What is in this PR would replace the Django blog post. The blog post then would focus on adding celery to a django project, or some other topic that isn't a good candidate for the documentation.

The challenge I see with the current structure of the Upsun docs is, as a user, if I navigate to "Deploying Express on Upsun" in the documentation, there is zero documentation on the page on how to actually deploy an express app on Upsun. There are some generic getting started links, and general nodejs links, but nothing about Express. You have to scroll all the way to the bottom (which is "below the fold") to find a link to a blog post about how to possibly host an express app on Upsun.

IMO, most users are going to hit this page, see no relevant information immediately and bounce. Instead, my suggestion is to put the needed information directly on the page. Blog posts then should be reserved for topics that aren't good candidates for documentation.

@gilzow
Copy link
Collaborator Author

gilzow commented Mar 5, 2024

Added the section for Flask.

Not included is the information on how to change to alternative python web servers. Though we do have a whole section on python web servers with full instructions (/languages/python/server.html) so we could just add a note/link on this flask page.

I also don't like that i have both the .environment method for adding the environment variable as well as the config file method. We are inconsistent on their usage (I'm just as much at fault here as everyone else). On the one hand it demonstrates both are valid options and exposes the user to both options. On the other, it adds complexity and noise to the instructions.

We might need to consider an internally strategy/guidelines on when to use each method, at least for the documentation.

@chadwcarlson
Copy link
Contributor

I couldn't comment directly, but we should update the Django topics to Flask topics, no?

@chadwcarlson chadwcarlson mentioned this pull request Mar 21, 2024
@chadwcarlson chadwcarlson changed the base branch from main to ga-staging March 21, 2024 18:58
@chadwcarlson chadwcarlson changed the title [demo] Getting Started Frameworks section for Upsun [Django + Flask] Getting Started Frameworks section for Upsun Mar 26, 2024
@AnouckColson AnouckColson merged commit 741306f into ga-staging Apr 3, 2024
9 checks passed
@AnouckColson AnouckColson deleted the getting-started-revision-demo branch April 3, 2024 10:00
AnouckColson added a commit that referenced this pull request Apr 3, 2024
* Bump versions for GA docs.

* Update trial buttons + CTA banners. (#3840)

* Remove 64 character Let's Encrypt limitation (#3876)

* Revert "Revert instance mounts and temporary alias doc" (#3868)

* Document billing (#3812)

* Document billing

* Add info on calculations

* Review explanations on estimates

* Small fixes

* Other small fixes

* Fix copy paste

* Apply suggestions from review

* Add screenshots

* Update formula

* Document configurable build resources (#3782)

* Document build resources

* Add note

* Add notes

* Apply feedback from review

---------

Co-authored-by: chadcarlson <[email protected]>

* Update secondary vendor site name (#3841)

* Rename secondary vendor site to upsun.

* Not found error + timeout.

* Update scope.

* again.

* Update regions.md (#3892)

* allow checks & environments for PRs against ga-staging

* Add framework section landing page.' (#3894)

* Update GS link + wrongly inherited content. (#3897)

* [WordPress] review Anouck (#3891)

* init commit

* adds additional files  section

* adds locations and mounts sections

* corrects issue with the header information formatting

* final change sections, adds documentation, community content, blogs sections

* spelling, grammatical updates/corrections

* Review

* Fix description and snippets

* Update table and apply suggestions.

---------

Co-authored-by: Paul Gilzow <[email protected]>
Co-authored-by: chadcarlson <[email protected]>

* Add PHP and Python continuous profiling documentation (#3895)

* Add PHP and Python continuous profiling documentation

* Add CPU support for the node.js cont profiler

* Doc review

---------

Co-authored-by: Anouck Colson <[email protected]>
Co-authored-by: chadcarlson <[email protected]>

* [Upsun] Custom backup schedules (#3890)

* Draft for the self-service automated-backup configuration

* Doc review

* Multi-line PATCH calls.

---------

Co-authored-by: remi <[email protected]>
Co-authored-by: Anouck Colson <[email protected]>
Co-authored-by: chadcarlson <[email protected]>

* Update teams feature availability for GA/self-service. (#3908)

* [Laravel] Resubmit: Adding the "Getting started" guide for Laravel (#3899)

* Clone the Symfony Getting Started. The  page is done.

* Correct typo on get-started

* WIP: First version of the laravel getting started guide

* First version of the Laravel Get Started Guide

* Update sites/friday/src/get-started/stacks/laravel/_index.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/blackfire.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/crons.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/environment-variables.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/faq.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/faq.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/faq.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Update sites/friday/src/get-started/stacks/laravel/faq.md

Co-authored-by: Thomas di Luccio <[email protected]>

* Doc review

---------

Co-authored-by: Guillaume Moigneu <[email protected]>
Co-authored-by: Guillaume Moigneu <[email protected]>
Co-authored-by: Thomas di Luccio <[email protected]>
Co-authored-by: Anouck Colson <[email protected]>

* [Express] Getting started guide (#3904)

* Reinstate Express GS guide.

* Fix express links. add add-database page.

* Doc review

---------

Co-authored-by: Anouck Colson <[email protected]>

* Restore simplified relationships (updated) (#3881)

* Update registry to use service names for relationship names.

* add-services/_index.md

* add-services/headless-chrome.md

* themes/../partials/examples/relationships.html

* themes/../partials/examples/servicedefn.html

* themes/../shortcodes/endpoint-description.md

* themes/../shortcodes/v2connect2app.md

* add-services/influxdb.md

* Fix usage example indents and comment spacing.

* add-services/kafka

* add-services/memcached.

* Fix double = typo.

* add-services/mongodb.md

* endpoint-description > oracle-mysql fix

* add-services/mysql/_index.md

* add-services/mysql/mysql-replication.

* add-services/network-storage

* add-services/opensearch.md

* add-services/postgresql

* add-services/rabbitmq.md

* add-services/redis

* add-services/solr.md

* add-services/varnish

* Fix random character mistake.

* create-apps/_index.md

* create-apps/app-reference

* guides/drupal/redis.

* languages/elixir.

* languages/java/migration

* languages/lisp.

* languages/ruby.

* learn/tutorials/restrict-service-access

* create-apps/workers.

* [guides|get-started/stacks]/symfony/environment-variables

* [Next.js] Getting started guide (#3903)

* Reinstate Next.js GS guide.

* Doc review

---------

Co-authored-by: Anouck Colson <[email protected]>

* Composable image (#3879)

* first draft for composable image on Upsun side (only for now)

* report changes to platform folder

* some improvement on Upsun composable image

* adding multiple runtimes note + NixOs presentation draft

* adding note at the beginning of PHP doc page (draft)

* adding disclaimer on languages and align P.sh with Upsun composable

* removing  top level key from Upsun + reformat code + adding TODO block in the HTML

* Apply doc review and suggestions from Jerome

* missing replacement of built-in image

* split codetab for PHP ext and Python to separate section

* remaining built-in image

* remaining built-in image

* Move PHP-specific content and redorder side nav

* Remove extra space

* PHP extensions update

* Update PSH composable image page

* Update PSH section index page

* Reorder side nav for PSH

* Fix numbering

* Further review suggestions applied

* Fix links. Remove duplicated file on conflict resolution.

* Add redirect notes where relevant (for type and extensions).

* Add the sticky note option, even though its not yet enabled.

* Fix failing 'Check internal links' for platform docs.

* Match fixed links on upsun docs.

* Fix note.

* Fix platform config from using upsun config.

* Fix platform file name.

* socket_family/protocol for primary runtimes

* Update example configuration for PHP runtime config.

* Fix links post-merge.

* Link checks on builds.

* Fix side nav

---------

Co-authored-by: Anouck Colson <[email protected]>
Co-authored-by: chadcarlson <[email protected]>

* [Strapi] Getting started guide (#3905)

* Reinstate Strapi GS guide.

* Add an add-database page to Strapi section.

* Doc review

---------

Co-authored-by: Anouck Colson <[email protected]>

* [Django + Flask] Getting Started Frameworks section for Upsun (#3816)

* WIP: initial changes to the Django stacks page

* finishes out the remaining steps, small configuration change

* adds flask instructions

* corrects indentation between from and to for deploy hook examples

* Update sites/friday/src/get-started/stacks/django.md

Co-authored-by: Chad Carlson <[email protected]>

* Update sites/friday/src/get-started/stacks/django.md

Co-authored-by: Chad Carlson <[email protected]>

* Update sites/friday/src/get-started/stacks/flask.md

Co-authored-by: Chad Carlson <[email protected]>

* adds the remaining bits to the flask doc

* adds section on alternative web servers and db migrate

* removes naming a specific number of remaining steps

* Match Django guide with the WordPress guide.

* Match Flask guide with the WordPress format.

* Doc review

---------

Co-authored-by: Chad Carlson <[email protected]>
Co-authored-by: chadcarlson <[email protected]>
Co-authored-by: Anouck Colson <[email protected]>

* Fix composable image xdebug configuration. (#3915)

* Pre-GA fixes (#3917)

* fix vale errors
.

* Fix bad merges.

* Remove hardcoded company names.

---------

Co-authored-by: AnouckColson <[email protected]>
Co-authored-by: Paul Gilzow <[email protected]>
Co-authored-by: Thomas di Luccio <[email protected]>
Co-authored-by: Anouck Colson <[email protected]>
Co-authored-by: remilejeune2 <[email protected]>
Co-authored-by: remi <[email protected]>
Co-authored-by: Guillaume Moigneu <[email protected]>
Co-authored-by: Guillaume Moigneu <[email protected]>
Co-authored-by: Thomas di Luccio <[email protected]>
Co-authored-by: flovntp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs rework For issues about updating the docs to the new style and content model (see the project for more) markdown/prose WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants