Git Product home page Git Product logo

begoodplus4's Introduction

first setup

  1. create postgreas database in docker
docker run --name postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=password postgres:alpine
  1. delete old database and copy data from .sql file to the postgres database
docker cp db.sql postgres:/tmp/db.sql
docker exec -it postgres /bin/bash
psql -h localhost -U postgres
DROP DATABASE testdb5;
CREATE DATABASE testdb5;
\q
PGPASSWORD=password psql -h localhost -U postgres -d testdb5 < /tmp/db.sql
  1. copy the secrets file
cp example-secrects.py secrects.py
  1. install python env and requirements
    python3 -m venv env
    source env/bin/activate
    pip install -r final_req.txt
    

how to run

pull the code

git pull

activate the env

source env/bin/activate

migrate the database

python manage.py migrate

run the server

python manage.py runserver

  1. open remote container Ctrl + Shift + P => Remote Containers: open folder in container

docker cp db.sql begoodplus4_devcontainer_db_1:/tmp/db.sql docker exec -it begoodplus4_devcontainer_db_1 /bin/bash DROP DATABASE testdb5; CREATE DATABASE testdb5; \q PGPASSWORD=password psql -h localhost -U postgres -d testdb5 < /tmp/db.sql

run on local

open BegoodPlus4 project

open Docker and run postgress

start env: .\env\Scripts\activate

cd .\begoodPlus\

python .\manage.py runserver

begoodplus4's People

Contributors

nhrnhr0 avatar akashrajum7 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.