chaoss / grimoirelab-bestiary

GNU General Public License v3.0
3 stars 9 forks source link

Create Bestiary service script #114

Closed jjmerchante closed 2 years ago

jjmerchante commented 2 years ago

This PR adds a first version of the Bestiary server script. By default, the server runs a WSGI app because it is supposed to be deployed with a reverse HTTP server in production. However, it can run a HTTP server when the --dev flag is activated. When this flag is active, the server will also serve the UI interface. To test it, you should follow the next steps.

Install the new dependencies with poetry install

$ poetry install

Build the UI interface artifact. The static files will be copied to bestiary/core/static and bestiary/core/templates.

$ cd ui
$ yarn build

Copy the static files to its destination

$ ./manage.py collectstatic --settings=config.settings.devel

Run the server

$ bestiaryd --config config.settings.devel --dev

The url http://localhost:8080 should show the login page.

To test it with a reverse proxy like NGINX using docker-compose the next files are necessary:

services: nginx: image: nginx:latest container_name: webserver restart: unless-stopped ports:

The run the server with the next command:

$ bestiaryd --config config.settings.devel

And run docker compose with:

docker-compose -f nginx.yml up

The URL http://localhost:8080 should show the login page.