docker based

This commit is contained in:
Sergio Álvarez 2021-09-15 13:27:22 +02:00
parent 4414b6035a
commit 7c9c787d97
14 changed files with 75 additions and 4 deletions

View File

View File

@ -0,0 +1,6 @@
This favicon was generated using the following font:
- Font Title: Margarine
- Font Author: Copyright (c) 2012 by Brian J. Bonislawsky DBA Astigmatic (AOETI) (astigma@astigmatic.com), with Reserved Font Name "Margarine"
- Font Source: http://fonts.gstatic.com/s/margarine/v11/qkBXXvoE6trLT9Y7YLye5JRLkAXbMQ.ttf
- Font License: SIL Open Font License, 1.1 (http://scripts.sil.org/OFL))

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,20 @@
{
"name": "Dencode",
"short_name": "Dencode",
"description": "Encode and Decode strings from/to URL, Base64, HTML entities, UU, Qprint, hash, hex and more.",
"icons": [
{
"src": "/img/favicon.io/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/img/favicon.io/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@ -1,6 +1,8 @@
<?php <?php
require_once 'vendor/autoload.php'; declare(strict_types=1);
require_once '../vendor/autoload.php';
// action => label // action => label
$buttons = [ $buttons = [
@ -96,7 +98,7 @@ if ($action == 'reset') {
if (JSON_ERROR_NONE !== json_last_error()) { if (JSON_ERROR_NONE !== json_last_error()) {
$result = 'Error: '. json_last_error_msg() ."\n\n". $str; $result = 'Error: '. json_last_error_msg() ."\n\n". $str;
} else { } else {
$result = json_encode($jd, JSON_PRETTY_PRINT | JSON_PRESERVE_ZERO_FRACTION); $result = json_encode($jd, JSON_PRETTY_PRINT | JSON_PRESERVE_ZERO_FRACTION | JSON_UNESCAPED_SLASHES);
} }
$help = 'https://www.php.net/json'; $help = 'https://www.php.net/json';
@ -114,11 +116,16 @@ if ($action == 'reset') {
</script> </script>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="description" content="Encode and Decode strings from/to URL, Base64, HTML entities, UU, Quprint, hash, hex and more." /> <meta name="description" content="Encode and Decode strings from/to URL, Base64, HTML entities, UU, Qprint, hash, hex and more." />
<title>Encode/Decode everything</title> <title>Encode/Decode everything</title>
<meta name="description" content="Encode/Decode everything, base64, url, html, charset"> <meta name="description" content="Encode/Decode everything, base64, url, html, charset">
<meta name="author" content="Sergio Álvarez <xergio@gmail.com>"> <meta name="author" content="Sergio Álvarez <correo@sergio.am>">
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon.io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon.io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon.io/favicon-16x16.png">
<link rel="manifest" href="/img/favicon.io/site.webmanifest">
<!-- <link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"> --> <!-- <link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"> -->
<link rel="stylesheet" href="https://unpkg.com/spectre.css@0.5.8/dist/spectre.min.css"> <link rel="stylesheet" href="https://unpkg.com/spectre.css@0.5.8/dist/spectre.min.css">

1
app/public/ppii.php Normal file
View File

@ -0,0 +1 @@
<?php phpinfo();

20
docker/docker-compose.yml Normal file
View File

@ -0,0 +1,20 @@
services:
dencode-nginx:
image: nginx:latest
ports:
- "8080:80"
volumes:
- ../app:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
links:
- dencode-php
dencode-php:
image: php:8-fpm
volumes:
- ../app:/var/www/html
networks:
default:
name: dencode-network

17
docker/nginx/default.conf Normal file
View File

@ -0,0 +1,17 @@
server {
index index.html index.php;
#server_name phpfpm.local;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html/public;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass dencode-php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}