Skip to content

Sample Platform.sh Python 3.6 project to play with Platform.sh relationships and services.

Notifications You must be signed in to change notification settings

webuildorg/platformsh-example-python-3.6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform.sh Python 3.6 minimal example

This project provides a starter kit for Django projects hosted on Platform.sh. It is primarily an example, although could be used as the starting point for a real project.

Notice specifically the server.py where we read some of the environment variables and configure Django to connect to the correct database and to a redis instance.

In this example we are not running any application server but the python script directly, you can check-out other examples to see it run with application servers such as Gunicorn.

Starting a new project

To start a new project based on this template, follow these 3 simple steps:

  1. Clone this repository locally. You may optionally remove the origin remote or remove the .git directory and re-init the project if you want a clean history.

  2. Create a new project through the Platform.sh user interface and select "Import an existing project" when prompted.

  3. Run the provided Git commands to add a Platform.sh remote and push the code to the Platform.sh repository.

That's it! You now have a working "hello world" level project you can build on.

Using as a reference

You can also use this repository as a reference for your own projects, and borrow whatever code is needed. The most important parts are the .platform.app.yaml file and the .platform directory.

About

Sample Platform.sh Python 3.6 project to play with Platform.sh relationships and services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages