IFMS-CTS Pension Module

DotNet & Angular CI

Setup the code repository

Prerequisites:

Run the following commands to clone the whole repository

git clone https://github.com/abusalam/IFMS-CTS.git ifms-cts
cd ifms-cts
git submodule update --init --recursive
cp .env.docker .env

Build Docker Images

Run the following command to build custom docker images to run this project

docker-compose build --build-arg HOST_UID=$UID

Setup Oracle database (Optional)

Run the following commands

mkdir oracle-home/data
sudo chown 54321:54321 oracle-home/data

You can start only required containers

To start dotnet container use the following command this will start only required stack for dotnet development

docker-compose up -d dotnet

or start angular using

docker-compose up -d angular

Or Start all containers

docker-compose up -d

Docker Output

Initially when you are setting up for the first time it may take a little longer time as oracle initializes it's database

You can check the progress of oracle database initialization by running the following command

docker-compose logs oracle

Output will look some thing like this when initialization is completed

Docker Oracle Output After the first run it will just take a couple of seconds to start everything

Login to Orcale using SqlPlus as dba

docker-compose exec oracle sqlplus sys/pgsql@localhost:1521/XE as sysdba

Docker SqlPlus Output

If you want to modify the database run the following query to switch from CDB(Container Database) to PDB(Pluggable Database)

alter session set container = XEPDB1;

Then you can run your CREATE, INSERT, UPDATE, DELETE queries after switching

During development you may need to restart the angular or dotnet servers if you make changes to the code that can't be hot reloaded.

Run the following command to restart the respective docker container

docker-compose restart angular
docker-compose restart dotnet

alt text

Also you can check the status by running the following command

docker-compose logs angular
docker-compose logs dotnet

Docker Angular Server Output Docker Dotnet Server Output

Apply patch for environment settings to your codebase

cd angular
git apply ../ng-env.patch
cd ../dotnet/CTS-BE
git apply ../../dotnet-env.patch

Make host entry: add the following line to your %WINDIR%\System32\drivers\etc\hosts file

127.0.0.1	docker.test api.docker.test uat.docker.test rabbitmq.docker.test mailhog.docker.test

Open Angular UI http://docker.test/static-login

Angular UI

Open Dotnet Swagger UI http://api.docker.test/swagger/index.html

Dotnet Swagger UI

RabbitMQ Management UI http://rabbitmq.docker.test

  • Default Login: guest/guest

RabbitMQ Management UI

Don't forget to restore postgresql database backup using pgAdmin

DB_HOST=localhost
DB_USER=docker
DB_PASSWORD=docker@1234
DB_NAME=docker
DB_PORT=5432

Enjoy!