Tidy up 404 and fix php logging to stdout

This commit is contained in:
Ric Harvey
2018-06-30 22:42:35 +01:00
parent bcbe15e85b
commit 51bbf4e04f
11 changed files with 31 additions and 444 deletions

View File

@@ -160,7 +160,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
echo /etc/apk/respositories && \
apk update && apk upgrade &&\
apk add --no-cache --virtual .sys-deps \
apk add --no-cache \
bash \
openssh-client \
wget \
@@ -211,8 +211,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo
pip install -U pip && \
pip install -U certbot && \
mkdir -p /etc/letsencrypt/webrootauth && \
# apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf && \
apk del .sys-deps
apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf
# apk del .sys-deps
# ln -s /usr/bin/php7 /usr/bin/php
ADD conf/supervisord.conf /etc/supervisord.conf
@@ -271,4 +271,5 @@ ADD errors/ /var/www/errors
EXPOSE 443 80
WORKDIR ["/"]
CMD ["/start.sh"]

View File

@@ -11,7 +11,7 @@ If you have improvements or suggestions please open an issue or pull request on
| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version |
|-----|-------|-----|--------|--------|
| latest | Master Branch |1.14.0 | 7.2.7 | 3.7 |
| 1.5.3 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 |
| 1.5.4 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 |
For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md)

View File

@@ -1,5 +0,0 @@
## To Do List
- Docker swarm guide
- AWS ECS guide
- Kubernetes guide

View File

@@ -31,13 +31,16 @@ server {
internal;
}
location ^~ /ngd-style.css {
alias /var/www/errors/style.css;
location ^~ /sad.svg {
alias /var/www/errors/sad.svg;
access_log off;
}
location ^~ /ngd-sad.svg {
alias /var/www/errors/sad.svg;
location ^~ /twitter.svg {
alias /var/www/errors/twitter.svg;
access_log off;
}
location ^~ /gitlab.svg {
alias /var/www/errors/gitlab.svg;
access_log off;
}

View File

@@ -22,14 +22,17 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
serverurl=unix:///dev/shm/supervisor.sock ; use a unix:// URL for a unix socket
[program:php-fpm]
command = /usr/local/sbin/php-fpm --nodaemonize --fpm-config /usr/local/etc/php-fpm.d/www.conf
command = /usr/local/sbin/php-fpm --force-stderr --nodaemonize --fpm-config /usr/local/etc/php-fpm.d/www.conf
autostart=true
autorestart=true
priority=5
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stopsignal=QUIT
[program:nginx]
command=/usr/sbin/nginx -g "daemon off; error_log /dev/stderr info;"
@@ -42,6 +45,7 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stopsignal=QUIT
[include]
files = /etc/supervisor/conf.d/*.conf

View File

@@ -23,6 +23,7 @@ The latest tag will always follow the master branch in git. the other versions w
| 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.6 |
| 1.5.2 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 |
| 1.5.3 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 |
| 1.5.4 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.8 |
These tags will be created on GitLab and as tags in docker hub.

View File

@@ -2,38 +2,15 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link href="ngd-style.css" rel="stylesheet" type="text/css">
<style type="text/css">a {text-decoration: none}</style>
<style type="text/css">body {text-align: center}</style>
<title>Error - 404</title>
</head>
<body class="status-page" id="app">
<div class="interface">
<div class="navbar-container">
<div class="navbar">
<div class="brand">
<figure>
</figure>
</div>
</div>
</div>
<div class="status-page-panel">
<img src="ngd-sad.svg">
<h1>Error: 404</h1>
<p>Looks like we can't find that page</p>
</div>
</div>
<div class="site-footer">
<section class="extra-pad">
<figure class="brand">
<a href="http://ngineered.co.uk/" title="visit ngineered">
<img src="http://ngineered.co.uk/themes/default/img/brand-light.svg">
</a>
</figure>
<nav class="social-links">
<a href="https://github.com/ngineered" title="View our github profile"><i class="ion-social-github"></i>Github</a>
<a href="https://twitter.com/ngineered" title="View our twitter profile"><i class="ion-social-twitter"></i>Twitter</a>
</nav>
</section>
</div>
<body>
<img src="./sad.svg"/>
<br/>
<h2>Page not Found</h2>
<a href="https://gitlab.com/ric_harvey" title="View my gitlab profile" style><img src="./gitlab.svg" height="15px"/> Gitlab</a>
<a href="https://twitter.com/ric__harvey" title="View my twitter profile"><img src="./twitter.svg" height="15px"/> Twitter</a>
</body>
</html>

1
errors/gitlab.svg Normal file
View File

@@ -0,0 +1 @@
<svg aria-hidden="true" data-prefix="fab" data-icon="gitlab" class="svg-inline--fa fa-gitlab fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M29.782 199.732L256 493.714 8.074 309.699c-6.856-5.142-9.712-13.996-7.141-21.993l28.849-87.974zm75.405-174.806c-3.142-8.854-15.709-8.854-18.851 0L29.782 199.732h131.961L105.187 24.926zm56.556 174.806L256 493.714l94.257-293.982H161.743zm349.324 87.974l-28.849-87.974L256 493.714l247.926-184.015c6.855-5.142 9.711-13.996 7.141-21.993zm-85.404-262.78c-3.142-8.854-15.709-8.854-18.851 0l-56.555 174.806h131.961L425.663 24.926z"></path></svg>

After

Width:  |  Height:  |  Size: 636 B

View File

@@ -1,398 +0,0 @@
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
img {
border: 0;
}
body,html {
min-height: 100%;
height: 100%;
}
figure,footer,nav,section {
display: block;
}
[hidden] {
display: none;
}
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body,figure {
margin: 0;
}
a {
background: 0 0;
}
a:focus {
outline: dotted thin;
}
a:active,a:hover {
outline: 0;
}
h1 {
margin: .67em 0;
}
code {
font-family: monospace, serif;
font-size: 1em;
}
svg:not(:root) {
overflow: hidden;
}
.navbar {
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
-khtml-box-sizing: border-box;
}
.navbar-container {
border-bottom: 1px solid #EBEBEB;
}
/*!
Ionicons, v2.0.0
Created by Ben Sperry for the Ionic Framework, http://ionicons.com/
https://twitter.com/benjsperry https://twitter.com/ionicframework
MIT License: https://github.com/driftyco/ionicons
Android-style icons originally built by Googles
Material Design Icons: https://github.com/google/material-design-icons
used under CC BY http://creativecommons.org/licenses/by/4.0/
Modified icons to fit ionicons grid from original.
*/
@font-face {
font-family: Ionicons;
src: url(../fonts/ionicons/ionicons.eot?v=2.0.0);
src: url(../fonts/ionicons/ionicons.eot?v=2.0.0#iefix) format("embedded-opentype"), url(../fonts/ionicons/ionicons.ttf?v=2.0.0) format("truetype"), url(../fonts/ionicons/ionicons.woff?v=2.0.0) format("woff"), url(../fonts/ionicons/ionicons.svg?v=2.0.0#Ionicons) format("svg");
font-weight: 400;
font-style: normal;
}
.ion,.ion-code:before,.ion-link:before,.ion-sad:before,.ion-social-chrome:before,.ion-social-css3:before,.ion-social-github:before,.ion-social-html5:before,.ion-social-twitter:before,.ionicons {
display: inline-block;
font-family: Ionicons;
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
text-rendering: auto;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.ion-code:before {
content: "";
}
.ion-link:before {
content: "";
}
.ion-sad:before {
content: "";
}
.ion-social-chrome:before {
content: "";
}
.ion-social-css3:before {
content: "";
}
.ion-social-github:before {
content: "";
}
.ion-social-html5:before {
content: "";
}
.ion-social-twitter:before {
content: "";
}
code[class*=language-] {
color: #000;
background: 0 0;
text-shadow: 0 1px #fff;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
code[class*=language-]::-moz-selection,code[class*=language-]::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
code[class*=language-]::selection,code[class*=language-]::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*=language-] {
text-shadow: none;
}
}
:not(pre)>code[class*=language-] {
background: #f5f2f0;
}
:not(pre)>code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.pad {
max-width: 1100px;
margin: 0 auto;
padding: 0 2em;
}
.interface:after,.interface:before,.navbar:after,.navbar:before,.site-footer .social-links:after,.site-footer .social-links:before,.site-footer section:after,.site-footer section:before {
content: "";
display: table;
}
.interface:after,.navbar:after,.site-footer .social-links:after,.site-footer section:after {
clear: both;
}
body {
background-color: #202B30;
line-height: 1.5;
font-size: 1em;
font-family: proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #031C2B;
}
.navbar,.site-footer section {
max-width: 1070px;
margin: 0 5%;
}
@media all and (min-width:1180px) {
.navbar, .site-footer section {
margin: 0 auto;
}
}
.interface {
background-color: #fff;
}
img {
width: 100%;
max-width: 100%;
}
h1,h2,h3,h4 {
font-weight: 300;
line-height: 1.2;
}
h1 a,h2 a,h3 a,h4 a {
color: inherit;
text-decoration: none;
}
h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover {
color: #2796D8;
}
h1 {
font-size: 2.3em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.5em;
}
h6 {
text-transform: uppercase;
font-size: .75em;
}
a {
color: #1577C1;
}
a:hover {
color: #FF6A39;
}
.navbar-container {
border-top: 10px solid #FF6A39;
}
.navbar-container:before {
content: '';
position: absolute;
background-color: #F45B29;
width: 33.33%;
height: 10px;
top: 0;
}
.navbar {
padding: 1em 0;
box-sizing: border-box;
min-height: 60px;
}
.navbar .brand {
width: 60%;
float: left;
margin-top: 3px;
}
.navbar .brand img {
width: 100px;
}
@media all and (min-width:980px) {
.navbar {
padding: 2.5em 0 2em;
}
.navbar .brand {
width: 15%;
margin-top: 0;
}
.navbar .brand img {
width: 150px;
}
}
.status-page .interface {
height: 90%;
}
.status-page-panel {
margin: 0 auto;
width: 80%;
max-width: 500px;
text-align: center;
position: relative;
top: 30%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.status-page-panel .status-page-brand {
margin: 2em 0;
}
.status-page-panel .status-page-brand img {
width: 150px;
}
.status-page-panel img {
width: 80px;
}
.status-page-panel h1 {
margin: 0;
}
.status-page-panel p {
margin: .5em 0 0;
}
.site-footer {
font-size: .875em;
border-top: 4px solid #FF6A39;
color: #70858F;
}
.site-footer .footer-section {
background-color: #1D2529;
}
.site-footer a {
color: #fff;
text-decoration: none;
}
.site-footer section {
padding: 2em 0;
}
.site-footer section.extra-pad {
padding: 3em 0;
}
.site-footer .brand {
width: 100px;
}
.site-footer .social-links {
margin-top: 1em;
}
.site-footer .social-links i {
display: inline-block;
margin-right: 5px;
}
.site-footer .social-links a {
display: inline-block;
margin-top: 1em;
margin-right: 20px;
}
@media all and (min-width:787px) {
.site-footer .brand {
width: 10%;
float: left;
}
.site-footer .social-links {
width: 80%;
float: right;
margin-top: 0;
text-align: right;
}
.site-footer .social-links a {
margin-top: 0;
margin-left: 20px;
margin-right: 0;
}
}

1
errors/twitter.svg Normal file
View File

@@ -0,0 +1 @@
<svg aria-hidden="true" data-prefix="fab" data-icon="twitter" class="svg-inline--fa fa-twitter fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>

After

Width:  |  Height:  |  Size: 1007 B

View File

@@ -1,3 +1,5 @@
<?php
echo phpinfo();
?>