cd ~
git clone git@github.com:zeek/zeek-pkg-web.git
cd zeek-pkg-web
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.
- Edit
cert_setup/ssl-update.sh
and set theDOMAINS
andEMAIL
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 thessl_certificate
andssl_certificate_key
values to match theDOMAINS
setting from earlier.
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
- Edit
secrets/database.sql
and change theBRO_USER_PASSWORD
value to match what is set insecrets.env
. - Edit
secrets/.env
and change theDB_HOST
value todb
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
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
docker exec -it zeek-pkg-web-php-1 /bin/bash
/etc/cron.daily/bro-pkg-web-cron.sh