Giter Club home page Giter Club logo

pims's Introduction

Setup

Docker

    ref: [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
    sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu eoan stable"
    sudo apt-get install docker-ce docker-ce-cli containerd.io

Postgres

  • install
    sudo apt install docker-compose
    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
    sudo systemctl enable docker
    docker-compose -f postgres.yml up
  • create user
CREATE USER pims WITH
	LOGIN
	SUPERUSER
	NOCREATEDB
	NOCREATEROLE
	INHERIT
	NOREPLICATION
	CONNECTION LIMIT -1
	PASSWORD 'p1m5';
  • create database
CREATE DATABASE pims
    WITH 
    OWNER = pims
    ENCODING = 'UTF8'
    CONNECTION LIMIT = -1;
  • or alter database owner
ALTER DATABASE pims OWNER TO pims;

Project

  • install pip and virtualenv
    wget https://bootstrap.pypa.io/get-pip.py
    python3 get-pip.py
    sudo pip install -U pip
    sudo pip install virtualenv
  • project setup
	git clone <url>
	virtualenv pims
	cd pims
	source bin/activate
	pip install django
	pip install psycopg2-binary
	pip install pika
	pip install coverage
  • database setup
    python3 manage.py makemigrations
	python3 manage.py migrate
	python3 manage.py createsuperuser
	python3 manage.py runserver
  • run
	cd pims
	source bin/activate
	python3 manage.py runserver

PGAdmin 4 - On *Unix

	sudo apt-get install python-dev
	sudo pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.5/pip/pgadmin4-1.5-py2.py3-none-any.whl

References

pims's People

Contributors

viniciusmayer avatar

Watchers

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