This is a simple application for managing IP Address with aliasing.
For running this application, you need to have the following application in your host.
- Docker
- Node - Also in Docker if needed
Please copy the following example files and craete your own files.
cp -av .env.example .env
cp -av docker-compose.yml.example docker-compose.yml
The following languages are used for the application
- PHP
- Typescript
The framework used
- Lumen
- Angular
-
Begin the application, you need to build the docker with the following command first and then start.
docker-compose build docker-compose up -d
-
Then need to install the required packages and do a dumpautoload
docker-compose exec php composer install docker-compose exec php composer dumpautoload
-
Now generate 2 keys for the application and JWT.
- Application Key
Copy the generated key and replace in the .env file for the APP_KEY
echo "APP_KEY=base64:"`echo 'ip-manager by ferdous' | base64`
NOTE: Lumen does not come with the key:generate CLI command, so this is a easy way to generate.
- JWT Key
docker-compose exec php php artisan jwt:secret
-
Next Step is to provide permission to the storage directory and migration for the database
docker-compose exec php chmod -Rf 777 storage docker-compose exec php php artisan migrate:fresh --seed
-
For API import the following Postman JSON file in the directory
ip-manager.json
-
Add an environment variable
base_url
to the system for APIhttp://localhost:8081/api
Please run the following command for the website to build from Typescript Compiler to Javascript
npm install
npx ng build --base-href http://localhost:8081/website/dist/website/
-
via Docker
docker-compose exec -w /app/website node npm install docker-compose exec -w /app/website node npx ng build --base-href http://localhost:8081/website/dist/website/
For running the application tests
docker-compose exec php php artisan migrate:fresh --seed
docker-compose exec php vendor/bin/phpunit ./tests --testdox --color
Finally go to the following URL to the browse the application