/lieblingsladen

Primary LanguageTypeScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Example Headless lieblingsladen.gera.de

General Information

Background

The site lieblingsladen.gera is to be converted into a regional marketplace for the city of Gera. This project shall help to visualize a headless e-commerce approach.

Requirements

general:

for example populate:

  • python3
  • modules: aiogqlc, requests

for remote setup on ubuntu:

  • local machine is linux distro
  • python3
  • modules: ansible

All python modules are included in /setup/pipfile for a virtual env.

Setup python virualenv:

  1. install pipenv
  2. navigate into /setup
  3. run pipenv install
  4. run pipenv shell

Local setup

  1. navigate into repo.
  2. Follow official dokumentation. Instead of using the default docker-compose.yml use docker-compose.customfrontend.yml.

Example: docker-compuse -f docker-compose.customfrontend.yml up

Remote Ubuntu setup

Required:

  • basic Ansible knowledge

Steps:

  1. add hosts file to ansible/config/
  2. add your host to it (see Ansible Documentation)
  3. navigate to /setup/ and run source export_env.sh
  4. add private key fore server to ssh agend
  5. navigate to ansible
  6. update access_control_allow_origin in setup_server.yml to match your domain
  7. run ansible-playbook setup_server.yml
  8. do setp 2 of local setup on remote system

Docker-compose file: docker-compose.customfrontend.cloud.yml

How to run it?

See Original Doku.

Difference:

  • Run docker-compose.customfrontend.yml instad of docker-compose.yml with docker compose. (like in local setup)

Graphql Demo Populate

  1. navigate to setup folder
  2. edit GRAPHQL_URL in populate_saleor.py to match your env.
  3. export env. var GRAPHQL_BEAR_TOKEN with your bear token (How to create token with api?/ Dashboard)
  4. run python3 populate_saleor.py

Where is the application running locally?

Licence

See BSD 3-Clause License.