Main important config keys which can be set via ENV Variables:
CITRINEOS_MESSAGE_API_URL="http://localhost:8080/ocpp"
CITRINEOS_DATA_API_URL="http://localhost:8080/data"
CITRINEOS_SCAN_AND_CHARGE="true"
CITRINEOS_DIRECTUS_URL="http://localhost:8055"
CITRINEOS_DIRECTUS_LOGIN_EMAIL="admin@CitrineOS.com"
CITRINEOS_DIRECTUS_LOGIN_PASSWORD="CitrineOS!"
CITRINEOS_DIRECTUS_QR_CODE_FOLDER="put folder id here"
CLIENT_URL="http://localhost:9010"
MESSAGE_BROKER_SSL_ACTIVE=False
MESSAGE_BROKER_HOST="127.0.0.1"
MESSAGE_BROKER_PORT=5672
MESSAGE_BROKER_USER="guest"
MESSAGE_BROKER_PASSWORD="guest"
MESSAGE_BROKER_VHOST="/"
MESSAGE_BROKER_EXCHANGE_TYPE="headers"
MESSAGE_BROKER_EXCHANGE_NAME="citrineos"
The name of the queue where this service will listen for events to be processed, e.g. when a TransactionEvent was received. (required)
MESSAGE_BROKER_EVENT_CONSUMER_QUEUE_NAME="paymentService"
WEBSERVER_HOST="0.0.0.0"
WEBSERVER_PORT=9010
WEBSERVER_PATH="/api"
DB_HOST="127.0.0.1" DB_PORT=5432 DB_DATABASE="citrine" DB_USER="citrine" DB_PASSWORD="citrine" DB_TABLE_PREFIX="payment_"
(container contains Stackbox' test api key) STRIPE_API_KEY="sk_test_some-stripe-api-key"
(Webhook needs to be configured with stripe and given secret needs to be used) STRIPE_ENDPOINT_SECRET_ACCOUNT="whsec_some-stripe-signing-secret"
(Webhook needs to be configured with stripe and given secret needs to be used) STRIPE_ENDPOINT_SECRET_CONNECT="whsec_some-stripe-signing-secret"
To set up your development environment, run the following commands:
./deploy_local.sh
To execute the tests, run the following command from the root directory:
python -m unittest
We use Ruff to lint and format our code.
To run the formatter, run the following command:
ruff format
To run the linter, run the following command:
ruff check