1 Star 0 Fork 0

dalaomai / saleor-platform

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

saleor-platform

All Saleor services started from a single repository

Keep in mind this repository is for local development only and is not meant to be deployed on any production environment! If you're not a developer and just want to try out Saleor you can check our live demo.

Requirements

  1. Docker
  2. Docker Compose

How to run it?

  1. Clone the repository:
$ git clone https://github.com/saleor/saleor-platform.git --recursive --jobs 3
  1. We are using shared folders to enable live code reloading. Without this, Docker Compose will not start:

    • Windows/MacOS: Add the cloned saleor-platform directory to Docker shared directories (Preferences -> Resources -> File sharing).
    • Windows/MacOS: Make sure that in Docker preferences you have dedicated at least 5 GB of memory (Preferences -> Resources -> Advanced).
    • Linux: No action required, sharing already enabled and memory for Docker engine is not limited.
  2. Go to the cloned directory:

$ cd saleor-platform
  1. Build the application:
$ docker-compose build
  1. Apply Django migrations:
$ docker-compose run --rm api python3 manage.py migrate
  1. Collect static files:
$ docker-compose run --rm api python3 manage.py collectstatic --noinput
  1. Populate the database with example data and create the admin user:
$ docker-compose run --rm api python3 manage.py populatedb --createsuperuser

Note that --createsuperuser argument creates an admin account for admin@example.com with the password set to admin.

  1. Run the application:
$ docker-compose up

Both storefront and dashboard are quite big frontend projects and it might take up to few minutes for them to compile depending on your CPU. If nothing shows up on port 3000 or 9000 wait until Compiled successfully shows in the console output.

How to update the subprojects to the newest versions?

This repository contains newest stable versions. When new release appear, pull new version of this repository. In order to update all of them to their newest versions, run:

$ git submodule update --remote

You can find the latest version of Saleor, storefront and dashboard in their individual repositories:

How to solve issues with lack of available space or build errors after update

Most of the time both issues can be solved by cleaning up space taken by old containers. After that, we build again whole platform.

  1. Make sure docker stack is not running
$ docker-compose stop
  1. Remove existing volumes

Warning! Proceeding will remove also your database container! If you need existing data, please remove only services which cause problems! https://docs.docker.com/compose/reference/rm/

docker-compose rm
  1. Build fresh containers
docker-compose build
  1. Now you can run fresh environment using commands from How to run it? section. Done!

Still no available space

If you are getting issues with lack of available space, consider prunning your docker cache:

Warning! This will remove:

  • all stopped containers
  • all networks not used by at least one container
  • all dangling images
  • all dangling build cache

More info: https://docs.docker.com/engine/reference/commandline/system_prune/

I've been warned

$ docker system prune

How to run application parts?

  • docker-compose up api worker for backend services only
  • docker-compose up for backend and frontend services

Where is the application running?

If you have any questions or feedback, do not hesitate to contact us via GitHub or Gitter:

License

Disclaimer: Everything you see here is open and free to use as long as you comply with the license. There are no hidden charges. We promise to do our best to fix bugs and improve the code.

Some situations do call for extra code; we can cover exotic use cases or build you a custom e-commerce appliance.

Crafted with ❤️ by Mirumee Software

hello@mirumee.com

BSD 3-Clause License Copyright (c) 2020-2022, Saleor Commerce Copyright (c) 2020, Mirumee Software All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

saleor-platform 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dalaomai/saleor-platform.git
git@gitee.com:dalaomai/saleor-platform.git
dalaomai
saleor-platform
saleor-platform
3.0

搜索帮助

344bd9b3 5694891 D2dac590 5694891