Giter Club home page Giter Club logo

largescalecomputation's Introduction

Getting Started

Prerequisities

  • Python 3.*
  • PostgresSQL
  • Nodejs This project was bootstrapped with Create React App.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You can just run docker-compose up -d --build in main folder to have all setup ready to development. Also you can edit and live view your changes in both front and backend apps.

In order to run this application, you need to have npm (Node Package Manager) installed. It comes with Node.js.

Setup FrontEnd

In the Pop-Grupa-A-Frontend project directory, you can run:

npm install

Installs required dependencies for starting up the project. (it might take a while, so wait patiently)

After installing all dependencies, run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Setup Backend

I advise to go through tutorial linked below, which I based flask API.

Python guide I followed for creating basic flask api structure.

In the Pop-Grupa-A-Backend project directory, you can run:

pip install -r requirements.txt

Installs required dependencies for starting up the project. (it might take a while, so wait patiently)

Next, when you have your local postgres database balticlsc created with user admin and password 123456 run:

python manage.py db upgrade -- applies migration to database

After installing all dependencies, run:

python manage.py run

Runs the app in the development mode.
Open http://localhost:5000 to view it in the browser.

API will reload if you make edits.
You will also see any lint errors in the console.

Browse docker database with pgAdmin4 manager

If you have pgadmin4 installed on your machine, launch it and create a new server with information from docker-compose.yml file.

  • Port: 5433
  • IP: 127.0.0.1
  • Login: admin
  • password: 123456 Then you will be able to browse database through pgadmin4 manager.

Docker

Docker for Windows Installation
To create and run docker images follow instruction below:

  1. Launch Powershell IDE or different console
  2. Navigate to directory containing 2 projects with docker-compose.yml file
  3. In console run docker-compose up -d --build - it will build images and spin up the containers. They will be accessed on localhost:3000 and localhost:5000. Any changes made in both projects will be automatically refreshed in containers (hot-reloading)

Note:

Migration to database in entrypoint.sh might not be applied due to windows line endings. To fix that, you may have to go inside API container and run the script automatically.

  • docker exec -it backend-pop sh - this command moves you inside the container
  • python manage.py db upgrade - runs migration to postgres database

Note2:

If you want to browse docker-created database, run those commands:

  • docker exec -it postgres sh
  • psql -U admin balticlsc

Build status

How to link pull request in GitHub to Azure Devops Board
Board Status

largescalecomputation's People

Contributors

kolendomichal avatar strachob avatar anvime avatar choromanskifilip avatar balcevia avatar michalchecinski avatar btqr avatar wasikm04 avatar ktkolasa 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.