Git Product home page Git Product logo

the-noteapp-stack's Introduction

Note Application

Built using React, [email protected], Bootstrap, Postgres, Django, Node, and Docker.

Requirements

Dev

Setting Up Your Local Dev Environment.

  1. Clone and cd into TodoApp3
  2. Create a file named .env and fill in the following variables:
DEBUG=1
REGION=massachusetts
DJANGO_SUPERUSER_USERNAME=user1
DJANGO_SUPERUSER_PASSWORD=20Yearly22
[email protected]
DJANGO_SECRET_KEY=fix_this_later

POSTGRES_READY=0
POSTGRES_DB=dockerdc
POSTGRES_PASSWORD=mysecretpassword
POSTGRES_USER=myuser
POSTGRES_HOST=localhost
POSTGRES_PORT=5435
  1. Install Node if you do not already have it.
  2. Install Yarn if you do not already have it.

Running The app.

The app can be ran using Docker. We are currently running it using a docker-compose service.

  1. Once you have the above .env file, navigate to your project root (right where docker-compose.yaml is) and run:
docker compose up -d

This will create a postgresql database that's running in the container.

  1. Once that file is created, it’s time to build the image! That just takes a simple command invocation:
docker build -t dockernode .
  1. Visit http://localhost:8000/admin in your browser to see the app and start using/developing.

  2. Next you need to make migrations and migrate them to the database. To do this, you need to first get in your docker container.

  • Run docker ps -a or docker images or to list all the containers downloaded and their info.
  1. When in your docker container, run the following commands. If you are on windows,use python manage.py <command> instad of ./manage.py. For the migrations on windows, you may need to do list all apps explicitly.

    • Run ./manage.py makemigrations on mac to make all the migrations.
    • If you get a message output of 'no changes detected' that is fine and you can just run the next command.
    • Run ./manage migrate to migrate the changes.
    • More on django migrations and migrate here.
    • Whenever you make a change to your models, please repeat steps 2 and 3.
  2. To bring this database down just run:

docker compose down

the-noteapp-stack's People

Contributors

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