Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
004d7798e2 | |||
3f66b8bf86 | |||
59791b49ec | |||
4491d5e0a3 | |||
364cec91fc | |||
96feb27b76 |
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
nginx.Dockerfile
|
||||
php.Dockerfile
|
||||
.dockerignore
|
||||
.gitignore
|
||||
LICENSE
|
@ -1,3 +1,5 @@
|
||||
# athena.fb-infra.uk
|
||||
|
||||
The web-app at athena.fb-infra.uk
|
||||
**Athena has been superceded by OwlBoard - [git](https://git.fjla.uk/OwlBoard) - [web](https://owlboard.info)**
|
||||
|
||||
**This repository is archived**
|
40
conf/deploy.sh
Normal file
40
conf/deploy.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOTIN="/data/in"
|
||||
ROOTOUT="/data/out"
|
||||
|
||||
echo "Running UglifyJS on /data/in folder"
|
||||
uglifyjs-folder "$ROOTIN" -x ".js" -eo "$ROOTOUT"
|
||||
|
||||
echo "Running UglifyCSS"
|
||||
CSSIN="/data/in/styles/"
|
||||
CSSOUT="/data/out/styles"
|
||||
|
||||
cd $CSSIN
|
||||
echo "Changed directory"
|
||||
for f in *
|
||||
do
|
||||
if [ -f "$f" ]; then
|
||||
uglifycss "$f" --output "$f";
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Moving 'styles' to 'out'"
|
||||
cp -r $CSSIN $CSSOUT
|
||||
|
||||
echo "Running html-minifier-terser on /folder"
|
||||
HTMLIN="/data/in/"
|
||||
HTMLOUT="/data/out"
|
||||
html-minifier-terser --collapse-whitespace --remove-comments --file-ext html --input-dir /data/in/ --output-dir /data/out/
|
||||
|
||||
echo "Moving JSON Manifest file from root to output"
|
||||
cat /data/in/manifest.json | jq -c > /data/out/manifest.json
|
||||
|
||||
echo "Moving other files folder from in/ to out/"
|
||||
cp -r /data/in/assets /data/out/assets
|
||||
cp -r /data/in/error-pages /data/out/error-pages
|
||||
cp -r /data/in/page-blocks /data/out/page-blocks
|
||||
cp -r /data/in/*.php /data/out
|
||||
|
||||
echo "Running GZIP & Brotli on all HTML, JS, CSS, JSON, SVG, TTF, VCF, PUB files"
|
||||
find /data/out -type f -name \*.html -or -name \*.vcf -or -name \*.pub -or -name \*.js -or -name \*.css -or -name \*.json -or -name \*.svg -or -name \*.ttf | while read file; do gzip -k -9 $file; brotli -k -q 11 $file; done
|
57
conf/nginx.conf
Normal file
57
conf/nginx.conf
Normal file
@ -0,0 +1,57 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 128;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
gzip_static on;
|
||||
brotli_static on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /site;
|
||||
|
||||
location ~ /(.git|php|page-blocks) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
index index.php;
|
||||
try_files $uri $uri/ $uri/index.php &uri/index.html =404;
|
||||
break;
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
error_page 403 /error-pages/403.php;
|
||||
error_page 404 /error-pages/404.php;
|
||||
error_page 500 501 502 503 504 /error-pages/50x.php;
|
||||
|
||||
}
|
||||
}
|
@ -27,8 +27,9 @@
|
||||
<br>
|
||||
|
||||
<h2 hidden>Server Maintenance</h2>
|
||||
<p hidden>Athena may be completely or partially unavailable between 1900-2300 on 07/10/2022,
|
||||
apologies for any inconvinience caused to you.</p>
|
||||
<p hidden>Athena may become unavailable for several hours on 07/03/2023
|
||||
during a server migration. Every effort will be made to prevend downtime.
|
||||
</p>
|
||||
|
||||
<h2>Quick Links</h2>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button>
|
||||
@ -44,8 +45,8 @@
|
||||
<br>
|
||||
<br>
|
||||
<div class="text-description">
|
||||
<p>This is an Alpha release and is under testing.</p>
|
||||
<p>Some features may not work and some stations may not be available.</p>
|
||||
<p>Athena has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||
<p>Athena will remain available for use as OwlBoard does not yet offer staff versions of boards.</p>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
|
26
issue.php
26
issue.php
@ -41,29 +41,13 @@
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "./page-blocks/title-image.php";?>
|
||||
|
||||
<h1>Please help us fix your issue</h1>
|
||||
<h1>Athena is retiring</h1>
|
||||
|
||||
<p>Give as much detail as possible so we can try to fix the problem.</p>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
||||
<span class="form-info">Subject:</span>
|
||||
<br>
|
||||
<input class="form-text-small" type="text" name="subject" placeholder="Subject" value="<?php echo $title;?>">
|
||||
<br>
|
||||
<br>
|
||||
<span class="form-info">Details:</span>
|
||||
<br>
|
||||
<textarea class="form-text-large" placeholder="Please give as much detail here as possible" name="detail"><?php echo $detail;?></textarea>
|
||||
<br>
|
||||
<br>
|
||||
<input class="actionbutton" type="submit">
|
||||
<br>
|
||||
<div class="text-description">
|
||||
<p>It has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||
<p>
|
||||
On submission of this form, your browsers User Agent string will be
|
||||
collected alongside the information you provide above and will be
|
||||
posted to the <a class="inlinelink" href="https://git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues?q=&state=open">
|
||||
issue tracker</a>.
|
||||
Currently, OwlBoard does not offer staff versions of departure boards.
|
||||
Because of this, Athena will not have any further issues fixed but will remain
|
||||
available until OwlBoard offers this feature.
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
|
12
nginx.Dockerfile
Normal file
12
nginx.Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM fedora:latest as compressor
|
||||
RUN dnf install brotli nodejs npm jq -y
|
||||
RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
|
||||
COPY . /data/in
|
||||
RUN bash /data/in/conf/deploy.sh
|
||||
|
||||
FROM fholzer/nginx-brotli:latest
|
||||
RUN rm /etc/nginx/nginx.conf
|
||||
RUN apk update
|
||||
RUN apk add --upgrade libxml2 libxslt
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=compressor /data/out/ /site/
|
3
php.Dockerfile
Normal file
3
php.Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM php:8.2.1-fpm-alpine
|
||||
|
||||
COPY . /site
|
Reference in New Issue
Block a user