Imported Readme

This commit is contained in:
Maddox Werts 2025-02-11 11:58:51 -05:00
parent c4ae50419d
commit 8ad67c0349

View file

@ -1,7 +1,35 @@
<h1 align="center">Dockerized-Rust</h1> <h1 align="center">StockMAPI</h1>
<p align="center">A Template for Rust Projects</p> <p align="center">A Stock Data API Provider.</p>
## About this Template ## Table of Contents
This template should be used when developing **Rust** apps. It's designed to be *lightweight* and *Fast*. I would recommend using this **with** my **Rust-LS** container as it makes Rust Development so much more fun and streamlined * [About this Project](#about-this-project)
* [Deploying](#deploying)
* [Usage](#usage)
Just adopt this into your project and it should take care of itself! ## About this Project
In order to avoid paying **$49.99** A MONTH, this project uses **2 Free APIs** *(AlphaVantage, MarketStack)* and stores the collected data into a **MySQL** database.
API Keys and Limits are setup in this project, so feel free to give it to whoever you want. As a suggestion, to create an API key, run the following command to generate one to insert into the *Database*: `openssl rand -base64 24`
## Deploying
This project has a [Docker Image](https://git.objnull.net/NeurontalTeam/-/packages/container/neurostock/latest) available on OBJNULL's Foragejo. However, to make things super simple, I have provided a **Docker-Compose** file for easy and reproducable deployment.
First, create a server to store *NeuroStock* on. Run the following commands:
```bash
wget https://git.objnull.net/NeurontalTeam/NeuroStock/src/branch/main/docker-compose.yml -O ~/docker-compose.yml
wget https://git.objnull.net/NeurontalTeam/NeuroStock/src/branch/main/data/settings.yaml.template -O /srv/conf/settings.yaml
```
Next, change the Docker-Compose to point towards the **/srv/conf** directory. Inside of that directory, edit the lines that you need to grab API Keys, Update the Database Password, etc.
After that, run the following command and you'll be all set!
```bash
docker-compose up -d
```
## Usage
Usage is extremely simple. Just follow the format below and you should be set! Make sure to use the API Key from your provider and ask them to track symbols *(Stocks)* that you want!
```bash
curl 'https://www.neurostock.site/v1?api=[CHANGEME]&symbol=[CHANGEME]'
```