Welcome to the Deep Lake Oracle Follower Node documentation. This README will guide you through setting up and running the Oracle Follower Node system, which consists of three main components: the database (Postgres), the follower node app, and the runner app.
The entire system is orchestrated using Docker and Docker Compose, ensuring ease of setup and consistent environments across different setups.
The system is composed of three Docker containers:
-
Postgres Database: This container runs the PostgreSQL database server, which stores the oracle data. Container name:
pg-deeplake
-
Follower Node App: A Node.js application that connects to the database and stores oracle data. Container name:
oracle-follower
-
Runner App: Essentially a cron job in a container, it collects data from Bitcoin regularly and inputs it into the system. Container name:
runner
Before you begin, ensure you have the following installed:
- Docker
- Docker Compose
-
Environment Variables:
- Set the any environment variables for PostgreSQL that you would like to modify. Defaults are provided but use of defaults for user and password is the least secure way to run. (
POSTGRES_VERSION
,PG_SHMSIZE
,PG_USER
,PG_PASSWORD
).
- Set the any environment variables for PostgreSQL that you would like to modify. Defaults are provided but use of defaults for user and password is the least secure way to run. (
-
Volume Setup:
- The
db-data
volume is used for persistent database storage. - The
./sql
directory should contain any initialization SQL scripts for the database.
- The
-
Network Configuration:
- The services are configured to use a bridge network named
deeplake_svcs
.
- The services are configured to use a bridge network named
-
Starting the Services:
- Navigate to the directory containing the
follower-node-compose.yml
file. - Run
docker-compose -f follower-node-compose.yml up -d
to start all the services in detached mode. - The services will start in the following order: Postgres Database, Follower Node App, Runner App.
- Navigate to the directory containing the
-
Monitoring the Services:
- Use
docker logs <container_name>
to view the logs for each container. - Use
docker ps
to check the status of the containers.
- Use
-
Stopping the Services:
- Run
docker-compose down
to stop and remove the containers and network.
- Run
- Ensure all environment variables are set correctly.
- Check container logs for any error messages or issues.
- Verify that the PostgreSQL container is fully initialized before the follower and runner apps start.
- To update the system, pull the latest Docker images and restart the services.
- Regularly backup the
db-data
volume to prevent data loss. - Monitor the system regularly for any performance or security issues.
For any issues or inquiries related to the Deep Lake Oracle Follower Node system, please contact our support team or visit our community forums.
This README provides a comprehensive guide for setting up and running the Deep Lake Oracle Follower Node system. If you have any specific requirements or additional information to include, please let me know!