Code Monkey home page Code Monkey logo

asteroids's Introduction

Flask-REST + WebUI

Flask + REST + WebUI for performing CRUD operations on an SQLAlchemy asteroid database.

Configuration

  • Creates and loads mariadb/mysql container from /dbinit
  • Update api/.env with proper mysql location for docker/local dev deployment
  • Update app/.env with proper location of API Hostname

WebUI --> http://localhost:8080 --> REST <--> http://localhost:8088/api/asteroids <--> MySQL

Docker Notes:

docker-compose up --build --force-recreate --no-deps --remove-orphans [-d]

- OR run individually - 
# Run APP with environment variables
docker run --env-file app/.env -p 8080:8080 fullaware/asteroid-app:latest

# Run API with environment variables
docker run --env-file api/.env -p 8088:8088 fullaware/asteroid-api:latest



# Stop remove all docker containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Kubernetes Install โŽˆ:

kubectl apply -k kustomize/

or

helm install asteroids ./asteroids/ --create-namespace --namespace asteroids

NOTE: issue with mysql-connector

https://stackoverflow.com/questions/73244027/character-set-utf8-unsupported-in-python-mysql-connector Set requirements.txt mysql-connector-python==8.0.29 instead of latest which is 8.0.30

Can't parse 910000000000000000000 into sizekg even though this is how many kg Ceres is.

{"name": "1 Ceres", "sizekg": "910000000000000000000", "hazard": "N", "diameterkm": "939.4", "spectraltype": "C", "rotationh": "9.07417", "au": "1.59478"} 

Design Notes:

Falcon 9 speed in kph 28163.52
1 AU in km 149597870.7
Time to travel 1 AU in hours 5311.760416
Time to travel 1 AU in days 221.3233507
Ceres size kg 910000000000000000000

asteroids's People

Contributors

fullaware avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.