This post covers starting FeatureBase using a simple Docker compose file and ingesting a moderate amount of data using a Python script. A container is started running a standalone instance of FeatureBase and exposes port 10101 for querying and ingestion.
If you would like to start an instance of FeatureBase configured for running a cluster, see the docker-cluster example.
Clone the FeatureBase examples repo in a terminal and change into the docker-simple directory:
Before starting the FeatureBase container(s), you will need to create a Docker network to be used by the services:
Start the services using docker compose:
NOTE: If you have issues with docker compose, try disabling v2 by going into settings..general in Docker Desktop.
You should now have a container running:
The script inserts "draws" of 81 different cards from Set the Game. The cards are represented with strings. For example, 3G#~ is shorthand for 3 green shaded squiggles.
Before you run the script, ensure you have the requirements installed:
Now run the script to insert data:
To check this worked, in your browser head over to http://0.0.0.0:10101 and run the following query:
Try other queries:
To insert data using a consumer on your local machine, you may either follow the docker-consumer example, or use the Community Guide to unzip FeatureBase locally.
The community download will include the molecula-consumer-csv binary, which you can use to insert data into this example's FeatureBase instance.
When you run FeatureBase in a container, you'll have to tell your local machine to map the featurebase hostname in the local host's /etc/hosts file. Make the following entry in hosts:
Assuming you installed FeatureBase's binaries in the ~/featurebase/ directory, you can now run the IDK consumer directly:
To remove the deployment run the following:
If you liked this guide, be sure to join the Discord and give us a shout!
docker run -p 10101:10101 featurebasedb/featurebase
git clone https://github.com/FeatureBaseDB/featurebase-examples.git
docker network create fbnet
docker compose up