Code Monkey home page Code Monkey logo

gcp-gke-django's Introduction

Install

  • Prerequisite: install docker & docker-compose

    docker version
    docker-compose version
    # or "docker compose version" if installed via docker-compose-plugin
  • Build the image

    touch env_vars/local.env
    docker-compose build
  • Initialize the database

    docker-compose up
    docker-compose exec api bash
    python manage.py migrate

Launch

docker-compose up
  • Go to localhost:8080

  • Documentation: localhost:8080/swagger

Install pre-commit

Checks code conventions.

Pre-commit sets up git hooks.
Once added, any scripts defined in .pre-commit-config.yaml runs upon commit and ensures defined conventions are met.

If they aren’t, files might be automatically fixed or you might have to fix the detected problems yourself. After fixing the files, add them to the staged diffs and commit.

  • Install python 3.12

    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt install python3.12 python3.12-dev
    
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python3.12 get-pip.py --force-reinstall
    python3.12 -m pip install --upgrade pip
    
  • Install pre-commit

    python3.12 -m pip install pre_commit
    
  • Add the pre-commit hook to git

    cd django
    python3.12 -m pre_commit uninstall
    python3.12 -m pre_commit install
    

    Note: After a rebase or fixing a conflict, you need to run pre-commit manually

    python3.12 -m pre_commit run --all-files
    

Deployment

gcp-gke-django's People

Contributors

a-mt avatar

Watchers

 avatar

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.