Code Monkey home page Code Monkey logo

recursive-rest's Introduction

Recursive-REST · Inline docs Docker version Python version PRs Welcome Activity

A simple devops-inspired template for Django applications setup with compose.

Introduction

Recursive-REST is a small application that exposes a REST endpoint and calls itself, itself using OAuth 2.0. This repository is mostly for experimentation, exploring Django community tools, and testing the behavior of specific functionality of interest. Let's get recursive! Any comments, feedback, and contributions are highly appreciated.  I always love to hear and learn from the community❤

Learn more about the Django framework from the official documentation.

Installing / Getting started

This is an overview of the minimal setup needed to get started.

Prerequisites

Follow these tutorials on setting up Docker and Compose on either Mac or Linux. I'd recommend Microsoft's documentation to set up Docker on WSL2 if you're on Windows.

Local Setup

The following setup was run on Ubuntu focal (20.04.6 LTS)

You can clone this repo with the following command.

  • Clone repository
    # cd your/desired/target/dir
    $ git clone [email protected]:apexDev37/Recursive-REST.git
    $ cd my-project

This will clone the repository to a target dir on your host machine with a custom name my-project/ and navigate into its root dir.

Configuration

Before running your application with Compose, configure your environment variables in the ./.envs/ directory. Example env files are provided to configure the following instances: Django and Postgres. You can create the required env files with the following code snippet.

  • Create env files
    # ensure you're in the project's root
    $ for file in .envs/*.example; do cp "$file" "${file%.example}"; done
    $ cd .envs/

This will loop through all the files in the .envs/ directory that end with .example and creates new files without the .example extension (ie. django.env.example -> django.env).

NOTE: After the env files are created, replace the placeholders in the files with your own values specific to your Django application and Postgres container.

Launch

You're all set to run your Django application. Spin up your Django and Postgres instances with the following command.

  • Spin up containers
    $ docker compose down
    $ docker compose up -d

This will create and start the Django and Postgres instances in the same network defined in the compose file.

Once the containers have been created and started, you can access the application at http://localhost:8000 Successful Django Install Page

Licensing

To make a repository open source, you must license it so that others may freely use, modify, and distribute the software. Using the MIT license, this project ensures this. The full original text version of the license may be seen here. To apply the right to your repository, follow the procedures.

recursive-rest's People

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.