Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload color patch #642

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

83 changes: 0 additions & 83 deletions .github/workflows/docker-publish.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/github-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will build the source code and create a new github package.
# For more information see: https://github.com/marketplace/actions/build-and-push-docker-images

name: Build

on:
push:
branches:
- master
- develop
tags:
- v*
- Sv*
pull_request:
branches:
- master
- develop

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/[email protected]
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.actor }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GITHUB_TOKEN }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io
# Docker repository to tag the image with
repository: talview/speedtest/speedtest
# Automatically tags the built image with the git reference as per the readme
tag_with_ref: true
tag_with_sha: true
# Path to the build context
path: .
# Path to the Dockerfile (Default is '{path}/Dockerfile')
dockerfile: Dockerfile
# Always attempt to pull a newer version of the image
always_pull: true
# Comma-delimited list of images to consider as cache sources
cache_froms: talview/speedtest/speedtest:develop,talview/speedtest/speedtest:latest
# Adds labels with git repository information to the built image
add_git_labels: true
# Whether to push the image
push: true
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql pdo_pgsql pgsql \
&& rm -rf /var/lib/apt/lists/*


# RUN sudo apt install mysql-server -y


# Prepare files and folders
RUN mkdir -p /speedtest/

# Copy sources
COPY backend/ /speedtest/backend


COPY results/*.php /speedtest/results/
COPY results/*.ttf /speedtest/results/

Expand All @@ -26,14 +31,16 @@ COPY favicon.ico /speedtest/

COPY docker/servers.json /servers.json

COPY logo.png /speedtest/

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 TELEMETRY=true
ENV ENABLE_ID_OBFUSCATION=false
ENV REDACT_IP_ADDRESSES=false
ENV WEBPORT=80
Expand All @@ -43,4 +50,4 @@ STOPSIGNAL SIGWINCH

# Final touches
EXPOSE 80
CMD ["bash", "/entrypoint.sh"]
CMD ["bash", "/entrypoint.sh"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
##To Run in Docker:

## Enter in the directory and Run these in terminal

docker build . -t speedtest

docker run -p 8080:80 docker-img-name

## To test or view, in browser

Go to browser: localhost:8080


![LibreSpeed Logo](https://github.com/librespeed/speedtest/blob/master/.logo/logo3.png?raw=true)

# LibreSpeed
Expand Down
5 changes: 5 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ cp /speedtest/*.js /var/www/html/
# Copy favicon
cp /speedtest/favicon.ico /var/www/html/

# Copy logo
cp /speedtest/logo.png /var/www/html/

# cp /speedtest/results/*.* /var/www/html/

# Set up backend side for standlone modes
if [[ "$MODE" == "standalone" || "$MODE" == "dual" ]]; then
cp -r /speedtest/backend/ /var/www/html/backend
Expand Down
2 changes: 1 addition & 1 deletion docker/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,4 +471,4 @@ function initUI(){
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display='none'">Close</a><br/>
</div>
</body>
</html>
</html>
Loading