Giter Club home page Giter Club logo

platformsh-django's Introduction

First steps

  1. Open a free trial account on Platform.sh
  2. Create an empty project
  3. Install the Platform.sh CLI

Setup

  1. Generate a repo from the template starting point at https://github.com/platformsh-examples/django
  2. Clone the repo locally
  3. platform project:list
  4. platform project:set-remote PROJECT_ID
  5. Create a GitHub API token
  6. Setup the integration using the token
  7. View the failed build in console.

Platformify

  1. cat steps/routes.yaml .platform
  2. cat steps/services.yaml .platform
  3. cat steps/app.yaml .platform.app.yaml
  4. git add . && git commit -m "Platformify Django"
  5. git push origin main
  6. View the production build
  7. View reused build/build+deploy steps
  8. platform ssh
  9. python manage.py generate_fake_data

Upgrade to 3.10

  1. Create a branch on GitHub to view data inheritance called test
  2. git checkout -b bumppy
  3. s/type: python:3.9/type: python: 3.10
  4. git add . && git commit -m "Upgrade to Python 3.10"
  5. git push origin bumpy
  6. Open a pull request to activate
  7. Merge
  8. git merge bumppy

Sanitizing data

  1. git checkout main
  2. git checkout -b sanitize
  3. platform ssh -e main 'echo $PLATFORM_ENVIRONMENT_TYPE'
  4. platform ssh -e test 'echo $PLATFORM_ENVIRONMENT_TYPE'
  5. platform ssh
  6. echo $PLATFORM_RELATIONSHIPS
  7. echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq
  8. DB_USER=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r '.database[0].username')
  9. Exit the session
  10. cp steps/sanitize.sh .
  11. chmod +x sanitize.sh
  12. git add . && git commit -m "Sanitize non-production environments"
  13. git push origin sanitize
  14. Open a pull request to activate
  15. View the now sanitized data
  16. Merge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.