mirror of
https://github.com/librespeed/speedtest.git
synced 2026-05-13 16:26:38 +00:00
* Initial plan * Add Docker TAGLINE env customization for modern UI slogan Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/e1da6e0e-5194-453d-bffb-961ed782e215 Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Refine TAGLINE replacement and expand E2E coverage Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/e1da6e0e-5194-453d-bffb-961ed782e215 Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Fix TAGLINE sed delimiter and add apostrophe tagline E2E test - Switch TAGLINE sed from '#' to '/' delimiter so html_escape'd apostrophes (') don't break the sed expression - Add standalone-apostrophe Docker service with TAGLINE="It'd rather be fast!" - Add standaloneApostrophe URL (port 18186) to env.js - Add E2E test asserting the apostrophe tagline renders correctly Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/ebe265a8-4b1e-49b5-959a-66133ea0ab3a Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
78 lines
2.3 KiB
Text
Executable file
78 lines
2.3 KiB
Text
Executable file
FROM php:8-alpine
|
|
RUN apk add --quiet --no-cache \
|
|
bash \
|
|
apache2 \
|
|
php-apache2 \
|
|
php-ctype \
|
|
php-phar \
|
|
php-gd \
|
|
php-openssl \
|
|
php-pdo \
|
|
php-pdo_mysql \
|
|
php-pdo_pgsql \
|
|
php-pdo_sqlite \
|
|
php-pgsql \
|
|
php-session \
|
|
php-sqlite3
|
|
|
|
# # use docker-php-extension-installer for automatically get the right packages installed
|
|
# ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
|
|
|
# # Install extensions
|
|
# RUN install-php-extensions iconv gd pdo pdo_mysql pdo_pgsql pgsql
|
|
|
|
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
|
|
ln -sf /dev/stderr /var/log/apache2/error.log
|
|
|
|
# Prepare files and folders
|
|
RUN mkdir -p /speedtest/
|
|
|
|
# Copy sources
|
|
COPY backend/ /speedtest/backend
|
|
COPY frontend/ /speedtest/frontend
|
|
|
|
COPY results/*.php /speedtest/results/
|
|
COPY results/*.ttf /speedtest/results/
|
|
|
|
COPY *.js /speedtest/
|
|
COPY index.html /speedtest/
|
|
COPY index-classic.html /speedtest/
|
|
COPY index-modern.html /speedtest/
|
|
COPY config.json /speedtest/
|
|
COPY favicon.ico /speedtest/
|
|
|
|
COPY docker/*.php /speedtest/
|
|
COPY docker/entrypoint.sh /
|
|
|
|
# Prepare default environment variables
|
|
ENV TITLE=LibreSpeed
|
|
ENV TAGLINE="No Flash, No Java, No Websockets, No Bullsh*t"
|
|
ENV MODE=standalone
|
|
ENV PASSWORD=password
|
|
ENV TELEMETRY=false
|
|
ENV ENABLE_ID_OBFUSCATION=false
|
|
ENV REDACT_IP_ADDRESSES=false
|
|
ENV WEBPORT=8080
|
|
ENV USE_NEW_DESIGN=false
|
|
|
|
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
|
|
STOPSIGNAL SIGWINCH
|
|
|
|
# Add labels for better metadata
|
|
LABEL org.opencontainers.image.title="LibreSpeed"
|
|
LABEL org.opencontainers.image.description="A Free and Open Source speed test that you can host on your server(s)"
|
|
LABEL org.opencontainers.image.vendor="LibreSpeed"
|
|
LABEL org.opencontainers.image.url="https://github.com/librespeed/speedtest"
|
|
LABEL org.opencontainers.image.source="https://github.com/librespeed/speedtest"
|
|
LABEL org.opencontainers.image.documentation="https://github.com/librespeed/speedtest/blob/master/doc_docker.md"
|
|
LABEL org.opencontainers.image.licenses="LGPL-3.0-or-later"
|
|
|
|
# Add health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:${WEBPORT}/ || exit 1
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
# Final touches
|
|
EXPOSE ${WEBPORT}
|
|
CMD ["bash", "/entrypoint.sh"]
|