Skip to content

EIDA/eida-portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart

Backend

Quick start guide

  1. Go to the root directory:

    src/eida-portal-backend/
  2. Create the virtual environment:

    python3 -m venv .env
  3. Activate the virtual environment:

    source .env/bin/activate
  4. Install the dependencies:

    pip install -r requirements.txt
  5. Initialize the DB:

    flask db init
  6. Create migration package:

    flask db migrate
  7. Apply migrations:

    flask db upgrade
  8. Apply the fixtures:

    sqlite3 ./app/db/epb.db < fixtures.sql
  9. Run:

    flask run

Frontend

Config of eida-portal-frontend

Some basic settings are stored in:

  • Production build: src/eida-portal-frontend/src/environments/environment.prod.ts.
  • Dev build: src/eida-portal-frontend/src/environments/environment.ts.

Production deployment

  • Build the distribution package:

    cd src/eida-portal-frontend/
    ng build --prod --base-href=/epf/
  • Build will be located in src/eida-portal-frontend/dist/eida-portal

  • Package is ready to be served directly by a simple static HTML server

Please refer to https://angular.io/guide/deployment

To build the eida-portal-frontend docker image

cd src/eida-portal-frontend/
docker build -t eida/frontend:latest .
docker run -p 49161:4200 -d eida/frontend:latest

Start local dev server for eida-portal-frontend

cd src/eida-portal-frontend/
npm install
npm start

Debug

Linux + Chrome + VS Code

  1. Start Chrome on Linux with debugging port: google-chrome-stable --remote-debugging-port=9222
  2. Start the EIDA Portal frontend: npm start
  3. VS Code -> Debug -> Start Debugging (make sure to select right profile)

Mac + Chrome + VS Code

  1. Start the EIDA Portal frontend: npm start
  2. VS Code -> Debug -> Start Debugging (make sure to select right profile)

Docker

  1. Build and run the images:
cd src/eida-portal-backend/
docker-compose -p 'epb' up -d --no-deps --build

CDN dependencies