diff --git a/Dockerfile b/Dockerfile index 6ceb4b9..c7785d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ -FROM alpine:latest +FROM docker.io/alpine:latest -RUN apk update && \ - apk add nginx php81-fpm +RUN apk update && apk add nginx php-fpm RUN adduser -D -g 'www' www diff --git a/README.md b/README.md index 04a4cfd..8050e20 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Made by yours truly -# Docker install +# Run with docker - docker build --no-cache -f ./Dockerfile --tag willy-club-website \ No newline at end of file + docker build --no-cache -f ./Dockerfile --tag willy-club-website + + docker run -dt -p 8080:8080 --name willy-club-website willy-club-website \ No newline at end of file diff --git a/app/WillySoft/Http/Route.php b/app/WillySoft/Http/Route.php index 4e3c527..df10abc 100644 --- a/app/WillySoft/Http/Route.php +++ b/app/WillySoft/Http/Route.php @@ -17,13 +17,9 @@ abstract class Route )) return; // check if the route matches and add parameters if any - $request_path = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']); - if ($request_path === '') { - $request_path = '/'; - } $args = []; $path_parts = explode('/', $path); - $request_path_parts = explode('/', $request_path); + $request_path_parts = explode('/', strtok($_SERVER["REQUEST_URI"], '?')); for ($i=0; $i < count($path_parts); $i++) { if (empty($path_parts[$i])) { continue; diff --git a/docker/nginx.conf b/docker/nginx.conf index 20a3fcb..3a127d7 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -34,4 +34,4 @@ http { include fastcgi.conf; } } -} +} \ No newline at end of file diff --git a/docker/run.sh b/docker/run.sh index ff23964..99bbca1 100644 --- a/docker/run.sh +++ b/docker/run.sh @@ -1,2 +1,4 @@ #!/bin/sh -nginx && php-fpm81 && tail -f /var/log/nginx/error.log \ No newline at end of file +nginx +php-fpm81 +tail -f /var/log/nginx/error.log \ No newline at end of file diff --git a/public/static/style/main.css b/public/static/style/main.css index c9cd295..66a59d9 100644 --- a/public/static/style/main.css +++ b/public/static/style/main.css @@ -7,11 +7,7 @@ body { color: #111; font-size: 1rem; font-family: Arial, Helvetica, sans-serif; - line-height: 1.75; -} -h1 { - margin-top: .5rem; - margin-bottom: .5rem; + line-height: 1.5; } a { color: blue;