feat: add saleor (#887)

* feat: add saleor

* fix: remove private key field

---------

Co-authored-by: Ronald Loyko <info@nordia.io>
This commit is contained in:
Ronald Loyko 2023-03-23 06:21:14 +02:00 committed by GitHub
parent 436af65169
commit e73765dbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 138 additions and 0 deletions

138
public/v4/apps/saleor.yml Normal file
View File

@ -0,0 +1,138 @@
captainVersion: 4
services:
$$cap_appname-api:
caproverExtra:
containerHttpPort: 8000
image: ghcr.io/saleor/saleor:$$cap_SALEOR_CORE_VERSION
environment:
DASHBOARD_URL: http://$$cap_appname.$$cap_root_domain
DATABASE_URL: postgresql://$$cap_POSTGRES_USER:$$cap_POSTGRES_PASSWORD@srv-captain--$$cap_appname-db/$$cap_POSTGRES_DB
CELERY_BROKER_URL: redis://srv-captain--$$cap_appname-cache
DEFAULT_FROM_EMAIL: $$cap_SALEOR_DEFAULT_FROM_EMAIL
SECRET_KEY: $$cap_SALEOR_SECRET_KEY
DEFAULT_CHANNEL_SLUG: default-channel
ALLOWED_HOSTS: $$cap_appname-api.$$cap_root_domain
ALLOWED_CLIENT_HOSTS: $$cap_appname-api.$$cap_root_domain
ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL: $$cap_ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL
depends_on:
- $$cap_appname-db
- $$cap_appname-cache
volumes:
- $$cap_appname-media:/app/media
$$cap_appname:
image: ghcr.io/saleor/saleor-dashboard:$$cap_SALEOR_DASHBOARD_VERSION
environment:
API_URL: http://$$cap_appname-api.$$cap_root_domain/graphql/
$$cap_appname-db:
caproverExtra:
notExposeAsWebApp: 'true'
image: postgres:$$cap_POSTGRES_VERSION
environment:
POSTGRES_DB: $$cap_POSTGRES_DB
POSTGRES_USER: $$cap_POSTGRES_USER
POSTGRES_PASSWORD: $$cap_POSTGRES_PASSWORD
volumes:
- $$cap_appname-db:/var/lib/postgresql/data
$$cap_appname-cache:
caproverExtra:
notExposeAsWebApp: 'true'
image: redis:$$cap_REDIS_VERSION
volumes:
- $$cap_appname-cache:/data
$$cap_appname-worker:
caproverExtra:
notExposeAsWebApp: 'true'
dockerfileLines:
- FROM ghcr.io/saleor/saleor:$$cap_SALEOR_CORE_VERSION
- CMD celery -A saleor --app=saleor.celeryconf:app worker --loglevel=info -B
environment:
DATABASE_URL: postgresql://$$cap_POSTGRES_USER:$$cap_POSTGRES_PASSWORD@srv-captain--$$cap_appname-db/$$cap_POSTGRES_DB
CELERY_BROKER_URL: redis://srv-captain--$$cap_appname-cache
DEFAULT_FROM_EMAIL: $$cap_SALEOR_DEFAULT_FROM_EMAIL
SECRET_KEY: $$cap_SALEOR_SECRET_KEY
DEFAULT_CHANNEL_SLUG: default-channel
ALLOWED_HOSTS: $$cap_appname-api.$$cap_root_domain
ALLOWED_CLIENT_HOSTS: $$cap_appname-api.$$cap_root_domain
ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL: $$cap_ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL
depends_on:
- $$cap_appname-cache
volumes:
- $$cap_appname-media:/app/media
caproverOneClickApp:
displayName: Saleor
description: An open-source, GraphQL-first e-commerce platform delivering ultra-fast, dynamic and personalized shopping experiences
isOfficial: true
documentation: https://saleor.io
instructions:
start: |-
Saleor is an open-source ecosystem for building rich e-commerce experiences.
Its centerpiece is Saleor GraphQL API that processes complex online store logic.
**You will need access to your server via SSH to perform some commands after deployment. This needs to be done only once.**
end: |-
Saleor has been successfully deployed! It might take few moments before it's fully started.
Before you can start using it, you need to perform some steps.
You only need to do this once.
**Please screenshot/copy the following instructions before proceeding:**
1. Access your server via SSH
2. Execute following command to trigger database migrations: `docker exec -it $(docker ps --filter name=srv-captain--$$cap_appname-api -q) python3 manage.py migrate`
3. **Optional**: If you want to populate the database with sample data, execute following command: `docker exec -it $(docker ps --filter name=srv-captain--$$cap_appname-api -q) python3 manage.py populatedb`
4. Execute following command to create your account: `docker exec -it $(docker ps --filter name=srv-captain--$$cap_appname-api -q) python3 manage.py createsuperuser`
That's it!
You can access the dashboard at `http://$$cap_appname.$$cap_root_domain`
You can access the API at `http://$$cap_appname-api.$$cap_root_domain`
variables:
- id: $$cap_SALEOR_CORE_VERSION
label: Core | Version
description: Saleor core version. Check out their valid tags at https://github.com/saleor/saleor/pkgs/container/saleor
defaultValue: '3.12.5'
validRegex: /.{1,}/
- id: $$cap_SALEOR_DASHBOARD_VERSION
label: Dashboard | Version
description: Saleor dashboard version. Check out their valid tags at https://github.com/saleor/saleor-dashboard/pkgs/container/saleor-dashboard
defaultValue: '3.12.1'
validRegex: /.{1,}/
- id: $$cap_ENABLE_ACCOUNT_CONFIRMATION_BY_EMAIL
label: Core | Email Confirmation
description: Whether registering new customer accounts should require email confirmation.
defaultValue: 'False'
validRegex: /^(True|False)$/
- id: $$cap_POSTGRES_VERSION
label: Database | Version
description: PostgreSQL version. Check out their valid tags at https://hub.docker.com/_/postgres/tags
defaultValue: '15.0-alpine'
validRegex: /.{1,}/
- id: $$cap_POSTGRES_DB
label: Database | Name
description: Name of the PostgreSQL database.
defaultValue: saleor
validRegex: /.{1,}/
- id: $$cap_POSTGRES_USER
label: Database | User Name
description: Name of the PostgreSQL user.
defaultValue: saleor
validRegex: /.{1,}/
- id: $$cap_POSTGRES_PASSWORD
label: Database | User Password
description: Password of the PostgreSQL user.
defaultValue: $$cap_gen_random_hex(16)
validRegex: /.{1,}/
- id: $$cap_REDIS_VERSION
label: Cache | Version
description: Redis version. Check out their valid tags at https://hub.docker.com/_/redis/tags
defaultValue: '7.0-alpine'
validRegex: /.{1,}/
- id: $$cap_SALEOR_DEFAULT_FROM_EMAIL
label: Mail | Version
description: Sender email address.
defaultValue: 'noreply@example.com'
validRegex: /.{1,}/
- id: $$cap_SALEOR_SECRET_KEY
label: Security | Secret Key
description: Secret key.
defaultValue: $$cap_gen_random_hex(16)
validRegex: /.{1,}/

BIN
public/v4/logos/saleor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB