Skip to content
Snippets Groups Projects
Commit b168ff6e authored by jurgenhaas's avatar jurgenhaas
Browse files

l3d#133 Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #1005848 canceled
/.env
/.ahoy.l3d
/.ahoy.yml
include:
- project: gitlab-ci-cd/general
ref: main
file: '/tagrelease.yml'
variables:
SUPPORT_LATEST_TAG: 1
VERSION: ${CI_COMMIT_TAG}
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
Unlighthouse:
stage: build
script:
- docker build --pull --build-arg VERSION=${VERSION} -t ${CI_REGISTRY_IMAGE} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker tag ${CI_REGISTRY_IMAGE}:${VERSION} ${CI_REGISTRY_IMAGE}:latest
- docker push ${CI_REGISTRY_IMAGE}:latest
only:
- tags
FROM alpine
ARG VERSION
LABEL com.example.vendor="LakeDrops" \
maintainer="juergen.haas@lakedrops.com" \
version="${VERSION}" \
description="An image for Unlighthouse, credit to https://github.com/indykoning/unlighthouse-docker from where we grabbed the idea."
ARG VERSION
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont
RUN apk add nodejs npm yarn; \
npm install -g unlighthouse@${VERSION}
EXPOSE 5678
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV SITE="http://localhost"
RUN chown root:root /usr/lib/chromium/chrome-sandbox && \
chmod 4755 /usr/lib/chromium/chrome-sandbox
# Add user so we don't need --no-sandbox.
RUN addgroup -S unlighthouse && adduser -S -G unlighthouse unlighthouse \
&& mkdir -p /home/unlighthouse/Downloads /app \
&& chown -R unlighthouse:unlighthouse /home/unlighthouse \
&& chown -R unlighthouse:unlighthouse /app
# Run everything after as non-privileged user.
USER unlighthouse
WORKDIR /home/unlighthouse
ADD unlighthouse.config.ts unlighthouse.config.ts
ENTRYPOINT npx unlighthouse --site ${SITE}
export default {
puppeteerOptions: {
args: ["--no-sandbox"],
},
server: {
open: false,
},
// In case you're proxying the frontend
// serverUrl: "http:/<site>/",
// clientUrl: "http://<site>/",
// apiUrl: "http://<site>/api",
// websocketUrl: "ws:///<site>/api/ws",
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment