/book-crud

A simple CRUD (Create, Read, Update, Delete) application built with Django Rest Framework, Nuxt.js, Nginx and Docker.

Primary LanguagePythonMIT LicenseMIT

Book CRUD

A simple CRUD (Create, Read, Update, Delete) application built on Django Rest Framework, Nuxt.js and Nginx.

It includes:

  • Automatic HTTPS with Let's Encrypt and Certbot.
  • Basic captcha for sign up form.

As a user you would be able to:

  • CRUD book entries.
  • Login and logout.
  • Sign up.

Installation

All you need is Docker and Docker Compose. Make sure you have them. Then:

# 1. Download this repo.
git clone https://github.com/luvejo/bookcrud

# 2. Well... you know.
cd bookcrud

# 3. Build and run.
docker-compose -f local.yml up --build

Go to http://127.0.0.1.

Screenshot

Development

In order to interact with a service, you could run:

docker-compose -f local.yml run --rm $SERVICE_NAME $COMMAND

For example, if you want to run the django shell, exec:

docker-compose -f local.yml run --rm django python manage.py shell

Deploying

Rename .envs/.production.example as .envs/.production and customize it. Then just:

# 1. Connect to your server
ssh $YOUR_SERVER

# 2. Download this repo.
git clone https://github.com/luvejo/bookcrud

# 3. ¯\_(ツ)_/¯
cd bookcrud

# 4. Build and run.
docker-compose -f production.yml up --build

Note: set STAGING_ENV to False to request a production Let's Encrypt certificate. If you're just testing, the default (True) will prevent hitting rate limits too early.

License

This project is licensed under the MIT License. See the LICENSE file for details.