Looking Glass fully Dockerized. Not compatible with Alpine because the command 'ps' is different in BusyBox, so we use a Debian image.

This commit is contained in:
dqos 2022-04-14 12:19:52 +02:00
parent 3bcecef5df
commit 02d7fcd581
7 changed files with 83 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
.idea
config.php
www.bat

18
docker-compose.yml Normal file
View file

@ -0,0 +1,18 @@
version: "3.8"
services:
nginx:
image: hybula/lookingglass-nginx:1
build:
context: docker/nginx
dockerfile: Dockerfile
ports:
- "80:80"
restart: unless-stopped
php-fpm:
image: hybula/lookingglass-php:1
build:
context: .
dockerfile: docker/php-fpm/Dockerfile
restart: unless-stopped

3
docker/nginx/Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM nginx:mainline-alpine
COPY nginx.conf /etc/nginx/nginx.conf

View file

@ -0,0 +1,2 @@
Dockerfile
Dockerfile.dockerignore

49
docker/nginx/nginx.conf Normal file
View file

@ -0,0 +1,49 @@
user nginx;
worker_processes 1;
error_log /dev/stderr warn;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout combined;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 100m;
server_tokens off;
gzip on;
open_file_cache max=100;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
root /var/www/html;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_buffering on;
fastcgi_buffer_size 1k;
fastcgi_buffers 128 1k;
fastcgi_max_temp_file_size 0;
gzip off;
}
}
}

View file

@ -0,0 +1,8 @@
FROM php:8.1-fpm-bullseye
RUN apt update && apt install iputils-ping mtr traceroute -y
WORKDIR /var/www/html
COPY . .
COPY docker/php-fpm/src/config.php config.php

View file

@ -0,0 +1,3 @@
Dockerfile
Dockerfile.dockerignore
.git