Deployment without Docker (OpenFN Adapter)
This guide will walk you through deploying the ID PASS DataCollect application without Docker, using the OpenFN adapter. This method requires you to manually set up and manage the environment and services.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (LTS version recommended)
- PNPM [[memory:6572312]]
- PostgreSQL
- Git
Step 1: Clone the Repository
First, clone the ID PASS DataCollect repository to your local machine:
git clone https://github.com/idpass/idpass-data-collect.git
cd idpass-data-collect
Step 2: Install Dependencies
Install the project dependencies using PNPM:
pnpm install
Screenshot Placeholder: A screenshot of the terminal output after pnpm install completes successfully.
Step 3: Set up PostgreSQL Database
-
Create a PostgreSQL User and Database:
Access your PostgreSQL server and create a dedicated user and database for the application. For example:
sudo -u postgres psqlCREATE USER idpassuser WITH PASSWORD 'idpasspassword';CREATE DATABASE idpassdb OWNER idpassuser;\qScreenshot Placeholder: A screenshot showing the PostgreSQL commands being executed in the psql terminal.
-
Configure Database Connection:
Create a
.envfile in thepackages/backenddirectory and configure the database connection string:cd packages/backendtouch .envEdit the
.envfile and add the following (replace with your actual credentials):DATABASE_URL="postgresql://idpassuser:idpasspassword@localhost:5432/idpassdb"Screenshot Placeholder: A screenshot showing the content of the
.envfile with theDATABASE_URL.
Step 4: Build the Application
Build the backend and frontend applications. From the project root:
pnpm build
This command will compile all necessary packages.
Screenshot Placeholder: A screenshot of the terminal output after pnpm build completes successfully, showing various packages being built.
Step 5: Run the Backend Server
Navigate to the packages/backend directory and start the server:
cd packages/backend
pnpm start
Screenshot Placeholder: A screenshot of the terminal output showing the backend server starting and listening on a port.
Step 6: Run the Frontend (Admin Panel)
In a new terminal, navigate to the packages/admin directory and start the admin panel:
cd packages/admin
pnpm start
Screenshot Placeholder: A screenshot of the terminal output showing the frontend development server starting.
Step 7: Access the Application
Once both the backend and frontend are running, you can access the application:
- Backend API:
http://localhost:3000(or the port configured inpackages/backend/.env) - Admin Panel:
http://localhost:5173(or the port shown when runningpnpm startinpackages/admin)
Screenshot Placeholder: A screenshot showing the application's login page in a web browser.