Git Product home page Git Product logo

vaccination-app's Introduction

Prerequisites

The backend of this project is run based on docker and docker-compose.

Please install docker at https://docs.docker.com/install/ and docker-compose at https://docs.docker.com/compose/install/.

Running the Project

Backend

  1. Copy the .env.example file available and create an .env file at the same directory. Update the fields accordingly for secret data.

  2. docker-compose --env-file .env config

    • This command will configure the docker-compose.yml by taking in the environment variables stated in .env
    • Note: please ensure to install docker-compose version 1.8+ for the config to work properly
  3. docker-compose up --force-recreate

    1. This will start the process of building the backend image from the source Python 3.6 base image, and installing pip packages stated inside the requirements.txt file.

      • Please refer to Dockerfile for more details.
      • All codes will be mounted as a volume inside the /code directory.
    2. A PostgreSQL base image will also be pulled from the docker registry.

    3. After building the image, the processes will be started as stated in the docker-compose.yml file.

      • Upon starting up, a data migration will be carried out based on the migrations stated inside the migrations folder.
      • Upon starting up, a loaddata will also be done using the following command: python ./manage.py loaddata booking/fixtures/data.json. If you do not wish to have this be done, please comment out this line.
      • A --force-recreate flag is set when calling docker-compose up to prevent data from being uploaded multiple times. You can remove this as well.
  4. Visit APIs documentation at localhost:8000/swagger/

  5. To list running docker containers, you can run docker ps, note the container id stated in the output.

  6. To execute commands inside the image, you can run docker exec -it <container_id> bash then run whatever commands you need.

    If you would like to run the test cases, run python manage.py test after getting into the backend image.

Frontend

Run the codes as stated in the frontend README.md.

The Tech Stack

  1. This project uses Django-Rest-Framework to deploy REST API.
  2. The database used is Postgresql. The ORM comes with Django is being used.
  3. drf-yasg is used to run Swagger for API documentation.

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.