Skip to content

zeek/zeek-pkg-web

Repository files navigation

INSTALLATION

Check out code

cd ~
git clone git@github.com:zeek/zeek-pkg-web.git
cd zeek-pkg-web

Edit secrets/.env

secrets/.env has a set of variables for passwords and such that PHP will need to connect to the database and update the packages list from GitHub.

(For production only) Initialize an SSL certificate

  • Edit cert_setup/ssl-update.sh and set the DOMAINS and EMAIL values to be sane for your installation.
  • Run the cert_setup/init-certs.sh script. This will generate a Let's Encrypt certificate, store it in the location that nginx container will use, and add a cron task to automatically update it.
  • Edit docker/nginx-default.conf and set the hostname in the ssl_certificate and ssl_certificate_key values to match the DOMAINS setting from earlier.

(For development only) Generate a self-signed certificate for testing

The nginx server that runs on the zeek-pkg-web-nginx container expects a certificate to exist in order to start up. If you are running in a production environment, this would have been generated by the above steps. If you are running in a development environment or one where you don't control your domain for LE to successfully generate a certificate, you will need to create a self-signed one.

The cert_setup/init-certs.sh script can do this by passing dev as an argument:

cert_setup/init-certs.sh dev

(For development only) Enable the database container

  • Edit secrets/database.sql and change the BRO_USER_PASSWORD value to match what is set in secrets.env.
  • Edit secrets/.env and change the DB_HOST value to db to map to the internal hostname for the docker database service.
  • Run the following:
docker compose -f docker-compose-dev.yml build
docker compose -f docker-compose-dev.yml up -d

Run docker-compose

docker compose -f docker-compose.yml build
docker compose -f docker-compose.yml up -d

This will create the images needed for nginx and PHP and start them running. The Dockerfiles for these images are stored in the docker directory. This will also create a Let's Encrypt cert based on the hostname set in the

(Optional) Run an update of the packages database

docker exec -it zeek-pkg-web-php-1 /bin/bash
/etc/cron.daily/bro-pkg-web-cron.sh

About

Web viewer for packages maintained by the Zeek Package Manager, e.g. https://packages.zeek.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7