/scp-cf-12-factor

Sample 12-factor app showing a ERP Agnostic Loosely Coupled Architecture. Part of the "Building the Intelligent Enterprise for SMBs" series.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

REUSE status License: Apache2

cf-12-factor

forked from B1SA/cfDemoSummit18

Description

Sample 12-factor app showing a scalable, resilient, ERP Agnostic, Loosely Coupled Architecture. This application works with both B1 and ByD. It also shows how to implement a persistence (PostgreSQL) and Cache (Redis) layers. These backing services are optional for the app to run, but extremely recommended.

This application can be deployed also on a Local Machine (for development purposes)

A full webinar presenting the 12 factors and how this app implements them is available to SAP Partners: Part 1 and Part 2

Exercise steps available on this guide

Requirments

Digital Core

Tooling

Deployment

STEP 1 - Download or Clone this repository

STEP 2 - Navigate to the directory you cloned and Push the app to Cloud Foundry

cf push --random-route

STEP 3 - Set the environment variables using the following command.

cf set-env cf-12-factor ERP b1
cf set-env cf-12-factor ERP_ODATA_HOST b1 http://<b1 host>:50001/b1s/v2

full list of variables on sample-launch.json

STEP 4 - OPTIONAL - Set the environment variables for the remote backing services (Redis and PostgresSQL).

cf REDIS_HOST cf-12-factor <redisinstance>.redis.cache.windows.net

Steps to created those services for free on hyperscalers in here

STEP 5 - Restart the app

cf restart cf-12-factor

STEP 6 - Run the app on the route displayed in the terminal

Support and Contributions

This repository is provided "as-is". No support is available. Feel free to open issues or provide pull requests.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.