Skip to content

Commit

Permalink
Merge pull request #2 from deb-cod/develop
Browse files Browse the repository at this point in the history
Included development files
  • Loading branch information
deb-cod authored Jul 1, 2024
2 parents f8f290a + 966cc7f commit 49fde1b
Show file tree
Hide file tree
Showing 20 changed files with 1,446 additions and 2,695 deletions.
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

0 comments on commit 49fde1b

Please sign in to comment.