Here’s what you’ll have after completing this guide:
- a website running Saleor
- a starting point to dive into the Saleor documentation
This guide will help get you started. We'll take you through key steps, introduce you to important concept and point you to further documentation and other resources along the way. It's not intended to be a complete tutorial, and you will need to be prepared to look further into some topics on your own if necessary.
Before we begin
Before we create a project, please familiarise yourself with the basics of Divio Cloud. Some key topics and resources:
General overview of the Control Panel
More information about your account, project settings and more.
How to create a new Divio Cloud project
Additional detail about project creation options.
Frequently Asked Questions
You might find answers to your questions here.
More experienced developers should be aware of the material in our Developer Handbook.
Some of these guides will make more sense and be most useful once you have already dived in and are working with Divio Cloud.
Create a new project
Create a new project with the following configuration:
- Platform: Python 3.6.x
- Type: Saleor
- Boilerplate: Default
Then select a suitable subscription and create the project.
Because of the way Saleor is packaged, it cannot be provided as a simple Divio Cloud addon. Instead, the complete Saleor source code is included in your project. This means that updating to a newer version is more complex than it would be normally.
You can update to the latest Saleor versions by running the update_saleor.sh script. Please note that this will override your Saleor files and should only be run initially.
Set up the project locally
You will need to be aware of some key topics as we continue - refer to these articles if necessary as you go along:
Managing project servers
Understand the difference between the test and live server.
Know what you can do with your project and its settings.
How to use the Divio App
Install and configure the Divio App for local development.
Once you have installed and launched the Divio App on your computer, set up the the project you just created by clicking Setup:
This will take a few minutes to conclude. Once completed hit Start to launch your local server.
Now you can open your local website using the "eye" icon on the top right of the Local Server in the Divio App or open up http://127.0.0.1:8000 in a browser. Once you have logged in, you should see the Saleor website:
Not working? Retrace your steps, and pay close attention to any error messages, as they will contain important information about the problem. You will also find valuable guidance in the material recommended above.
/login/ . The Saleor dashboard is at
This will use our Aldryn SSO single-sign-on system, using your Divio Cloud credentials. The default Saleor form is still available to use.
Divio Cloud uses Docker to run your projects locally. This allows you to use any programming language – be it Python, Node or PHP – locally, without configuring your operating system to support it. If you are experience issues, have a look at our troubleshooting section or our Docker guide.
Preparing for the Saleor development
Before you can start diving into the Saleor documentation, we need to do a few more things:
Open the source folder in a code editor. You'll find it by selecting the "folder" icon in the Divio App and opening the whole directory in your editor:
Using a shell
You will need to run commands in a command line environment. The Divio App makes this easy for you - just click on the Divio Shell button on the lower left of the app. This will create a terminal shell with all the necessary environment variables in place.
Everything should show up with green checks - if not trace your steps back to resolve it.
About shell commands
You should be familiar with basic shell commands such as
cp as they are essential items in the developer's toolbox. The Learn Python the Hard Way tutorial has a very good appendix introducing these commands.
From time to time you need to run specific commands such as:
python manage.py migrate
pip install -r requirements.txt
You will need to run these inside the Docker container of your project, not in your own environment on your computer. To get into the container, run the following command in the Divio Shell:
docker-compose run --rm web bash
Don't forget to
cd to into the project folder first.
You can also issue commands in the shell to run in the container, by prefixing them with
docker-compose run --rm web . For example:
docker-compose run --rm web python migrate
docker-compose run --rm web pip install -r requirements.txt
Divio Command Line Interface
It's very helpful to understand the basic commands for the Divio CLI (Command Line Interface). For example, you can use it to start and stop the server inside the shell far quicker then the Divio App. Some helpful commands:
divio project upto start the local development server
divio project stopto stop a project
divio project updateto update the local development server
Basic Docker commands
Docker also provides a number of helpful commands. See our documentation for more, but for now you should know about:
docker-compose up- starts the server (stop it with control-c)
You can upload and download files from your local server to the test server easily using the Divio App. Simply use the corresponding Download and Upload controls and select what you want to transfer from the menu.
The underlying technology behind the file management is Git. If you type
git status into an open shell inside the project you will get a report, perhaps something like:
The Divio App automatically commits these changes into your Git repository. Divio provides a Git server as part of the service.
Git is a version control system (VCS) and tracks the history of your changes as people and teams collaborate together on a project. It is very helpful to be familiar with Git and what it does. An excellent starting point is the very popular Git tutorial on GitHub.
Start developing with Saleor
Now head over to the Saleor documentation and start your journey to develop an e-commerce solution.