Quickly Run Github Package 🛫
Make .env file like the sample file in the repo
docker run -d -p 80:80 --env-file .env ghcr.io/daniel-fernandez-951/nauclerus-api:release
Table of Contents
API endpoint for general aviation, rotorcraft and commercial pilots to store their logbook data. Nauclerus runs in a Docker container, allowing secure local access and redundant storage using NAS device that supports running Docker containers. Nauclerus can also send your logbook data to a cloud service, ensuring there's always a backup of your logbook (at the cost of security for data redundancy).
Relational SQL database schema and relationships (subject to change):
For more details, checkout requirements.txt file.
Instructions for running the Dockerfile locally.
❓ Running this on a NAS device (Synology or QNAP), please refer to NAS distributor documentation for running Nauclerus API on your device.
Depending on your choice in this section Data Storage Options; either configure a remote database (the cloud) or save the database file locally.
- You decide Data Storage Options!
- Navigate to the repository on your local machine and open a terminal window in that directory
docker build -t <foo> . && docker run -p 80:80 -it <foo>
- Replace
<foo>
with your desired container name, likethanks-daniel
.
- Replace
-
Local Storage:
- Change
/app/sqlUtils/database.py
from os import getenv from dotenv import load_dotenv from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base load_dotenv() SQLALCHEMY_DATABASE_URL = getenv('HEROKU_SQL_DB') engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} ) SessionLocal = sessionmaker( autocommit=False, autoflush=False, bind=engine ) Base = declarative_base()
- Create
/.env
file -
Change
HEROKU_SQL_DB=sqlite:///./sql_app.db
sql_app.db
to any file name you'd like!
- Create
- Change
-
Cloud Database Storage:
-
Confirm
/app/sqlUtils/database.py
looks like this:from os import getenv from dotenv import load_dotenv from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base load_dotenv() SQLALCHEMY_DATABASE_URL = getenv('HEROKU_SQL_DB') engine = create_engine( SQLALCHEMY_DATABASE_URL ) SessionLocal = sessionmaker( autocommit=False, autoflush=False, bind=engine ) Base = declarative_base()
-
Create
/.env
file‼️ When copying URI from cloud provider, check (or change) preamble topostgresql://
-
Change values in
HEROKU_SQL_DB=postgresql://<USER>:<PASSWORD>@<HOST>:<PORT>/<DATABASE>
< >
to your setup (most have a preformatted URI).
-
-
Once the Docker image is running, navigate to localhost/docs
or localhost/redoc
for API documentation with input capabilities.
Check back later for more information.
- Add an endpoint for uploading logbook in the following formats:
-
.xls
-
.xlsx
-
.csv
-
- Frontend for data entry
-
Other Logbook styles (Professional and General Aviation)Now has a general layout to accomidate all types and Logbook styles! -
GET
endpoint for reports - More
GET
andPOST
endpoints
Please suggest some features! This is a one human project (now), and new ideas welcomed to break any calcification.
Distributed under GPL-3.0 License. See LICENSE for more information.
Support me by buying me 1/10 of a gallon of AvGas, so I can practice my taxiing:
- Stellar XLM:
GBLOUZQPCQXVQAJAHSM2PUEWKHJT5M3TAQ63LKT6KQCQPNI2X5MZSL23
Or by suggesting features and pointing out any bugs.
Thank you!
- When connecting to Heroku PostgresQL Datastore:
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
Solution: Navigate to .env
file and change your database URI from postgres://
--> postgresql://