If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.
You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!
This senzing/python-demo docker image demonstrates how to write a Flask app based on the senzing/senzingapi-runtime docker image.
- 🤔 - A "thinker" icon means that a little extra thinking may be required. Perhaps you'll need to make some choices. Perhaps it's an optional step.
- ✏️ - A "pencil" icon means that the instructions may need modification before performing.
⚠️ - A "warning" icon means that something tricky is happening, so pay attention.
- Space: This repository and demonstration require 6 GB free disk space.
- Time: Budget 40 minutes to get the demonstration up-and-running, depending on CPU and network speeds.
- Background knowledge: This repository assumes a working knowledge of:
-
Construct Senzing SQL Connection. Example:
export SENZING_SQL_CONNECTION="postgresql://username:password@hostname:5432:G2/"
-
Run docker container. Example:
sudo docker run \ --env SENZING_SQL_CONNECTION \ --publish 8356:5000 \ --rm \ senzing/python-demo
-
The running app is viewable at localhost:8356.
-
Specify a new directory to place artifacts in. Example:
export SENZING_VOLUME=~/my-senzing
-
Create directories. Example:
export PGADMIN_DIR=${SENZING_VOLUME}/pgadmin export POSTGRES_DIR=${SENZING_VOLUME}/postgres export RABBITMQ_DIR=${SENZING_VOLUME}/rabbitmq export SENZING_UID=$(id -u) export SENZING_GID=$(id -g) mkdir -p ${PGADMIN_DIR} ${POSTGRES_DIR} ${RABBITMQ_DIR} chmod -R 777 ${SENZING_VOLUME}
-
Download artifacts. Example:
wget \ -O ${SENZING_VOLUME}/docker-compose-backing-services-only.yaml \ "https://raw.githubusercontent.com/Senzing/docker-compose-demo/main/resources/postgresql/docker-compose-rabbitmq-postgresql-backing-services-only.yaml" wget \ -O ${SENZING_VOLUME}/docker-compose.yaml \ "https://raw.githubusercontent.com/Senzing/docker-python-demo/main/docker-compose.yaml"
-
Bring up a Docker Compose stack with backing services. Example:
docker-compose -f ${SENZING_VOLUME}/docker-compose-backing-services-only.yaml pull docker-compose -f ${SENZING_VOLUME}/docker-compose-backing-services-only.yaml up
-
Download
docker-compose.yaml
file and deploy stack. Note:SENZING_VOLUME
needs to be set. Example:docker-compose -f ${SENZING_VOLUME}/docker-compose.yaml pull docker-compose -f ${SENZING_VOLUME}/docker-compose.yaml up
-
The running app is viewable at localhost:8356.
Configuration values specified by environment variable or command line parameter.