diff --git a/docker-compose.unlighthouse.yaml b/docker-compose.unlighthouse.yaml index efb9853..1b4ca52 100644 --- a/docker-compose.unlighthouse.yaml +++ b/docker-compose.unlighthouse.yaml @@ -9,7 +9,6 @@ services: uid: $DDEV_UID gid: $DDEV_GID user: '$DDEV_UID:$DDEV_GID' - networks: [default, ddev_default] restart: "no" shm_size: ${UNLIGHTHOUSE_SHM_SIZE:-1gb} cap_add: @@ -17,12 +16,18 @@ services: labels: com.ddev.site-name: ${DDEV_SITENAME} com.ddev.approot: $DDEV_APPROOT - entrypoint: [ "/entrypoint.sh" ] environment: DDEV_HOSTNAME: $DDEV_HOSTNAME NODE_EXTRA_CA_CERTS: /mnt/ddev-global-cache/mkcert/rootCA.pem + entrypoint: [ "/entrypoint.sh" ] volumes: - - ../reports/unlighthouse:/home/$USER/reports/export - - ../tests/unlighthouse:/home/$USER/reports/config - - .:/mnt/ddev_config:ro - - ddev-global-cache:/mnt/ddev-global-cache + - ../reports/unlighthouse:/home/$USER/reports/export + - ../tests/unlighthouse:/home/$USER/reports/config + - .:/mnt/ddev_config:ro + - ddev-global-cache:/mnt/ddev-global-cache + networks: [default, ddev_default] + external_links: + - ddev-router:${DDEV_SITENAME}.${DDEV_TLD} + web: + links: + - unlighthouse \ No newline at end of file diff --git a/unlighthouseBuild/Dockerfile b/unlighthouseBuild/Dockerfile index 44a8abf..b96ff72 100644 --- a/unlighthouseBuild/Dockerfile +++ b/unlighthouseBuild/Dockerfile @@ -47,6 +47,9 @@ RUN apt update --fix-missing; apt install -y sudo; mkdir /etc/sudoers.d; echo "A RUN mkdir --parents /home/$username/reports && chown --recursive $username:$username /home/$username +# Install mkcert +RUN apt update --fix-missing; apt install -y curl libnss3-tools; curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"; chmod +x mkcert-v*-linux-amd64; cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert + # Setup ddev user name and folder. USER $username WORKDIR /home/$username/reports diff --git a/unlighthouseBuild/entrypoint.sh b/unlighthouseBuild/entrypoint.sh index 61192ac..2842925 100644 --- a/unlighthouseBuild/entrypoint.sh +++ b/unlighthouseBuild/entrypoint.sh @@ -14,4 +14,7 @@ if [ -n "$routerIp" ]; then IFS=$OIFS fi +#Adding certs +CAROOT=/mnt/ddev-global-cache/mkcert/ mkcert -install + sleep infinity