Skip to content
Snippets Groups Projects
Select Git revision
  • 94e391d795c65b4966eeb4e929c000f4f3b774ca
  • master default protected
2 results

heyheylibrary

TheJoeCoder's avatar
94e391d7
History

heyHeyLibrary

A library system written in Django to manage books. Suitable for someone with a bookshelf or for a whole library.

WARNING: THIS IS STILL IN DEVELOPMENT, SO NOT ALL FEATURES ARE HERE YET!

Badges

GPLv3 License wakatime

Demo

Demo server coming soon

Contributing

Contributions are always welcome! Fork the repo to another git service, make your changes, then drop me an email (joe at radialbog9 dot uk) or a discord message (radialbog9) so I can have a look!

Run Locally

Install for development in a venv with Python:

git clone https://git.rb9.xyz/TheJoeCoder/heyheylibrary
cd heyheylibrary
python -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt

Create the database:

./venv/bin/python manage.py migrate

Then, to run the dev server:

./venv/bin/python manage.py runserver

Errors

If you get the following error:

ModuleNotFoundError: No module named 'pkg_resources'

... then you may need to install setuptools in your venv like so:

./venv/bin/python -m pip install setuptools

Deployment

Refer to the Django Wiki for deployment instructions.

Or, via docker:

# Clone the repo
git clone https://git.rb9.xyz/TheJoeCoder/heyheylibrary
cd heyheylibrary

# Copy the example .env files
cp .env.prod-example .env.prod
cp .env.prod.db-example .env.prod.db
cp .env.prod.search-example .env.prod.search
# Change the .env files to your liking here

# Build and run the containers
docker compose -f docker-compose.prod.yml up -d --build

# Create indexes for opensearch
docker compose -f docker-compose.prod.yml exec web python manage.py opensearch index create

# Apply the migrations
docker compose -f docker-compose.prod.yml exec web python manage.py migrate --noinput

# Collect the static files
docker compose -f docker-compose.prod.yml exec web python manage.py collectstatic --no-input --clear

The app should now be running on localhost:1337

Tech Stack

Client: Bootstrap 5, JQuery

Server: Django, MySQL/SQLite/Postgres

License

GPL 3.0