mirror of
https://github.com/librespeed/speedtest.git
synced 2026-05-14 00:36:39 +00:00
* Create stale.yml * Configure Dependabot for GitHub Actions and Docker Added support for GitHub Actions and Docker updates. * Bump actions/stale from 5 to 10 Bumps [actions/stale](https://github.com/actions/stale) from 5 to 10. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v5...v10) --- updated-dependencies: - dependency-name: actions/stale dependency-version: '10' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bump actions/checkout from 4 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bump docker/build-push-action from 5 to 6 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * typo * Add npm package manager with development tooling and improve Docker builds (#5) * Initial plan * Add npm package manager with development tooling Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Add package manager investigation summary Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Improve Docker build process and analyze PHP package manager needs Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Fix documentation based on code review feedback Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Initial plan * Add npm package manager with development tooling Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Add package manager investigation summary Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Improve Docker build process and analyze PHP package manager needs Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Fix documentation based on code review feedback Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Restore Dockerfile.alpine to dev version (re-enable php-apache2) * Remove redundant docker-php-extension-installer from Dockerfile.alpine * remove useless ai files * typo * Initial plan * Initial plan * Improve Docker build process and analyze PHP package manager needs Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * remove useless ai files --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at> * Update .github/workflows/stale.yml Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> * Update Dockerfile.alpine Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> * Update .github/workflows/stale.yml Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
57 lines
1.9 KiB
Docker
Executable file
57 lines
1.9 KiB
Docker
Executable file
FROM php:8-apache
|
|
|
|
# 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 and cleanup in a single layer to reduce image size
|
|
RUN install-php-extensions iconv gd pdo pdo_mysql pdo_pgsql pgsql \
|
|
&& rm -f /usr/src/php.tar.xz /usr/src/php.tar.xz.asc \
|
|
&& apt-get autoremove -y \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
# Prepare files and folders
|
|
RUN mkdir -p /speedtest/
|
|
|
|
# Copy sources
|
|
COPY backend/ /speedtest/backend
|
|
|
|
COPY results/*.php /speedtest/results/
|
|
COPY results/*.ttf /speedtest/results/
|
|
|
|
COPY *.js /speedtest/
|
|
COPY favicon.ico /speedtest/
|
|
|
|
COPY docker/servers.json /servers.json
|
|
|
|
COPY docker/*.php /speedtest/
|
|
COPY docker/entrypoint.sh /
|
|
|
|
# Prepare default environment variables
|
|
ENV TITLE=LibreSpeed
|
|
ENV MODE=standalone
|
|
ENV PASSWORD=password
|
|
ENV TELEMETRY=false
|
|
ENV ENABLE_ID_OBFUSCATION=false
|
|
ENV REDACT_IP_ADDRESSES=false
|
|
ENV WEBPORT=8080
|
|
|
|
# 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 curl -f http://localhost:${WEBPORT}/ || exit 1
|
|
|
|
# Final touches
|
|
EXPOSE ${WEBPORT}
|
|
CMD ["bash", "/entrypoint.sh"]
|