Giter VIP home page Giter VIP logo

django-graphql-starter's Introduction

django-graphql-starter

Getting Started

To get started contributing you need to have Docker installed. From here, you should be able to complete most things with Docker and the provided Makefile.

Just run make to start the docker containers, install dependencies, copy the env file, and migrate the database.

If you prefer to start the project without using the Makefile, you will need to make sure that dependencies are installed, all of the containers are running, the .env file is present, and the database is migrated and seeded.

Running Tests

Use the Makefile

make test

Or

  1. Exec into the app container
docker-compose exec app bash
  1. Run pytest
pytest

Dependencies

I use pip-tools to help manage dependencies.

requirements.in is the file which contains the project's base required dependencies and is the file to which you would add more dependencies.

pip-compile will produce your requirements.txt, with all the dependencies (and all underlying dependencies) pinned.

Adding Dependencies

Steps

  1. Add dependency to requirements.in
echo "pytest" >> requirements.in
  1. Run pip-compile
make compile
  1. Rebuild containers to install dependencies from the updated requirements.txt
make build

By rebuilding, we don't have to install the new dependencies each time we start the containers and the image will be updated for the next time start the app.

Upgrading Dependencies

Steps

  1. Upgrade using pip-compile through the Makefile
make upgrade dep=pytest
  1. Rebuild containers to install dependencies from the updated requirements.txt
make build

If you need more complex updating control, exec into app container

docker-compose exec app bash

Follow pip-tools documentation for updating requirements

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.