Code Monkey home page Code Monkey logo

pointstransfer's Introduction

Points Transfer

Installation

  • Clone the repository

  • Setup Environment Variables;

    • On \pointsTransfer\pointsTransfer

      • Import or create a .env file

        • Variables needed for this project:

          • SECRET_KEY=<Django generated secret key (not the default)>

            ALLOWED_HOSTS=<allowed hosts IP's and/or domain name>

            CSRF_TRUSTED_ORIGINS=< Trusted request origins full URL or IP>

            DEBUG=True (remove this one for production mode)

  • Run initial management commands

    • On \pointsTransfer\pointsTransfer
      • Create the database Migrations
        • python .\manage.py makemigrations
      • Run the Migrations
        • python .\manage.py migrate
  • Create a Super User for testing

    • On \pointsTransfer\pointsTransfer
      • python .\manage.py createsuperuser
  • Run the project

    • On \pointsTransfer\pointsTransfer
      • python .\manage.py runserver
  • Access the admin panel

Docker File: Build and run application image only

  • First step

  • Build application image

    • docker build --tag points-transfer .
  • Run application image

    • docker run --publish 8000:8000 points-transfer
  • Second step

  • Run initial management commands

    • Open interactive terminal on
      • docker exec -it points-transfer /bin/bash
      • Create the database Migrations
        • python .\manage.py makemigrations
      • Run the Migrations
        • python .\manage.py migrate
      • Create a Super User for testing
        • python .\manage.py createsuperuser
  • Access the admin panel

    • Go to 127.0.0.1:8000
      • Port may differ if you change it on "runserver" command.

Docker Compose: Build and run application, database and other services

  • First step

    • Build services (application and database)
      • docker-compose build
    • Run services (application and database)
      • docker-compose up
  • Second step

  • Run initial management commands

  • Open interactive terminal on

    • docker exec -it points-transfer /bin/bash
  • Create the database Migrations

    • python .\manage.py makemigrations
  • Run the Migrations

    • python .\manage.py migrate
  • Third step

    • Stop, rebuild and run again the images to apply the changes
      • docker-compose stop
      • docker-compose build
      • docker-compose up
    • Create a Super User for testing
      • python .\manage.py createsuperuser
  • Access the admin panel

    • Go to 127.0.0.1:8000
      • Port may differ if you change it on "runserver" command.

Obs: If any changes are made to the application code, database or other services, build and run the images again.

pointstransfer's People

Contributors

berubel 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.