Display, search and copy LXD images using a web interface.
This Repository is the Webinterface for the LXDHub REST API.
NodeJS
Installation
To install the depencies of lxdhub-web, run the following command
yarn
Run for Development
Run the following command for a dev server.
Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
yarn start
Build for Production
Run the following command, to build the project.
The build artifacts will be stored in the dist/
directory.
API_URL=<PROD_API_URL> LOGGING_URL=<PROD_API_URL>api/v1/log npm run build
Docker
Run in Development
Run and open the site on http://localhost:4200
docker build -t lxdhub-web:dev . && docker run -p 4200:80 lxdhub-web:dev
Run in Production
- Configure nginx (optional)
You can configure the nginx configuration, which is used to serve the
built dist/
folder. Readme more about nginx.
Edit the configuration by running in your shell vi nginx-custom.conf
- Build the image
docker build -t lxdhub-web:prod --build-arg env=prod \
--build-arg API_URL=http://prod.com:3000 \
--build-arg LOGGING_URL=http://prod.com:3000api/v1/log .
- Run the image
docker run -p 80:80 lxdhub-web:prod
- Open LXDHub Web in your browser http://localhost
Tests
Run the following command to execute the unit tests via Karma.
npm run test
npm run test:coverage # For coverage report, generated in folder coverage
More Links
People
- Livio Brunner - Author
- Eric Keller - Idea