From 9cd459d897c11c993757ec1c49e564aabb753203 Mon Sep 17 00:00:00 2001 From: soneill Date: Tue, 27 Jul 2021 15:20:52 +1200 Subject: [PATCH] adds xdebug --- Dockerfile | 7 ++ config/pathfinder/config.ini | 2 +- config/pathfinder/pathfinder.ini | 26 ++----- config/pathfinder/plugin.ini | 5 +- docker-compose.yml | 15 ++-- pathfinder | 2 +- setup.sh | 128 ------------------------------- static/nginx/nginx.conf | 2 +- static/php/php.ini | 3 +- 9 files changed, 28 insertions(+), 162 deletions(-) delete mode 100755 setup.sh diff --git a/Dockerfile b/Dockerfile index 9438400..7bf9808 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN apk update \ COPY pathfinder /app WORKDIR /app + RUN composer install #FROM trafex/alpine-nginx-php7:latest @@ -24,6 +25,12 @@ COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf #COPY static/php/php.ini /etc/php7/conf.d/zzz_custom.ini +# DEBUG +RUN apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ +COPY static/php/xdebug.ini /etc/php7/conf.d/xdebug.ini +COPY static/php/error_reporting.ini /etc/php7/conf.d/error_reporting.ini +RUN echo "zend_extension=/usr/lib/php7/modules/xdebug.so" >> /etc/php7/php.ini + COPY static/php/php.ini /etc/zzz_custom.ini # configure cron COPY static/crontab.txt /var/crontab.txt diff --git a/config/pathfinder/config.ini b/config/pathfinder/config.ini index bfe63bc..fe39d4e 100644 --- a/config/pathfinder/config.ini +++ b/config/pathfinder/config.ini @@ -1,7 +1,7 @@ ; Global Framework Config [SERVER] -SERVER_NAME = CARLFINDER +SERVER_NAME = PATHFINDER COMMUNITY EDITION [globals] ; Verbosity level of error stack trace for errors diff --git a/config/pathfinder/pathfinder.ini b/config/pathfinder/pathfinder.ini index 554591a..282f1ac 100644 --- a/config/pathfinder/pathfinder.ini +++ b/config/pathfinder/pathfinder.ini @@ -6,21 +6,21 @@ ; This name is used in e.g. emails, user interface ; Syntax: String ; Default: Pathfinder -NAME = Goryn Are Lost +NAME = Pathfinder Community Edition ; Pathfinder version ; Version number should not be changed manually. ; Version is used for CSS/JS cache busting and is part of the URL for static resources: ; e.g. public/js/vX.X.X/app.js ; Syntax: String (current version) -; Default: v2.0.0 -VERSION = v2.0.1 +; Default: v2.1.1 +VERSION = v2.1.1 ; Contact information [optional] ; Shown on 'licence', 'contact' page. ; Syntax: String ; Default: https://github.com/exodus4d -CONTACT = https://github.com/exodus4d +CONTACT = https://github.com/samoneilll ; Public contact email [optional] ; Syntax: String @@ -31,7 +31,7 @@ EMAIL = ; Used for 'licence', 'contact' page. ; Syntax: String ; Default: https://github.com/exodus4d/pathfinder -REPO = https://github.com/exodus4d/pathfinder +REPO = https://github.com/goryn-clade/pathfinder ; Show warning on 'login' page if /setup route is active ; DO NOT disable this warning unless /setup route is protected or commented in routes.ini @@ -368,8 +368,8 @@ LOG_LINES = 1000 ; ADMIN =========================================================================================== ; "SUPER" admins and additional "CORPORATION" admins can be added here ;[PATHFINDER.ROLES] -;CHARACTER.0.ID = 123456789 -;CHARACTER.0.ROLE = SUPER +CHARACTER.0.ID = 1163491939 +CHARACTER.0.ROLE = SUPER ;CHARACTER.1.ID = 1122334455 ;CHARACTER.1.ROLE = CORPORATION @@ -395,15 +395,3 @@ GIT_HUB = https://api.github.com ; Syntax: 0 | 1 ; Default: 0 PERSISTENT_DB_CONNECTIONS = 1 - -[PATHFINDER.SYSTEMTAG] -; Systemtag status -; If enabled new systems will be tagged using the defined style -; Syntax: 0 | 1 -; Default: 0 -STATUS = 1 - -; Naming scheme to use -; Syntax: String -; Default: countConnections -STYLE = countConnections diff --git a/config/pathfinder/plugin.ini b/config/pathfinder/plugin.ini index ef86bc0..694c48a 100644 --- a/config/pathfinder/plugin.ini +++ b/config/pathfinder/plugin.ini @@ -2,6 +2,5 @@ MODULES_ENABLED = 1 [PLUGIN.MODULES] -DOTLAN = ./app/ui/module/dotlan -TAGS = ./app/ui/module/tags - +DEMO = ./app/ui/module/demo +EMPTY = ./app/ui/module/empty diff --git a/docker-compose.yml b/docker-compose.yml index 2a2c8c9..0dce796 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,15 +46,15 @@ services: build: '.' env_file: - .env - labels: - caddy: map.goryn.wtf - caddy.reverse_proxy: "{{upstreams 80}}" + # labels: + # caddy: map.goryn.wtf + # caddy.reverse_proxy: "{{upstreams 80}}" networks: - pf - - caddy -# ports: -# - 80:80 -# - 8030:8030 + # - caddy + ports: + - 80:80 + - 8030:8030 healthcheck: disable: true volumes: @@ -72,4 +72,3 @@ volumes: redis_data: networks: pf: - caddy: diff --git a/pathfinder b/pathfinder index 2a52d93..ccdb9b7 160000 --- a/pathfinder +++ b/pathfinder @@ -1 +1 @@ -Subproject commit 2a52d933e361d946fab73836bcb1c1d64b0ba6d7 +Subproject commit ccdb9b7f6c6b33fe95939a1bd79a3e89d2e5338f diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 040d380..0000000 --- a/setup.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -. static/menu.sh -source $CWD\.env - - -#https://bytefreaks.net/gnulinux/bash/cecho-a-function-to-print-using-different-colors-in-bash -cecho () { - declare -A colors; - colors=(\ - ['black']='\E[0;47m'\ - ['red']='\E[0;31m'\ - ['green']='\E[0;32m'\ - ['yellow']='\E[0;33m'\ - ['blue']='\E[0;34m'\ - ['magenta']='\E[0;35m'\ - ['cyan']='\E[0;36m'\ - ['white']='\E[0;37m'\ - ); - - - - local defaultMSG=""; - local defaultColor="black"; - local defaultNewLine=true; - - - - while [[ $# -gt 1 ]]; - do - key="$1"; - - - - case $key in - -c|--color) - color="$2"; - shift; - ;; - - -n|--noline) - newLine=false; - ;; - *) - # unknown option - ;; - esac - shift; - done - - message=${1:-$defaultMSG}; # Defaults to default message. - color=${color:-$defaultColor}; # Defaults to default color, if not specified. - newLine=${newLine:-$defaultNewLine}; - - echo -en "${colors[$color]}"; - echo -en "$message"; - if [ "$newLine" = true ] ; then - echo; - fi - tput sgr0; # Reset text attributes to normal without clearing screen. - return; -} - - -function wizzard { - cecho -c 'blue' "$@"; - #echo -e "\e[4mMENU: select-one, using assoc keys, preselection, leave selected options\e[24m" - #declare -A options2="${$2}" - #declare -A options2=( [foo]="Hallo" [bar]="World" [baz]="Record") - ui_widget_select -l -k "${!menu[@]}" -s bar -i "${menu[@]}" - #echo "Return code: $?" - #return "$?" -} - -function editVariable(){ -if [ "$1" == "" ]; then - read -p "Please set a config value for $3 [$2]: " VALUE - VALUE="${VALUE:-$2}" - #sed -i "s/$3=.*/$3=\"$VALUE\"/g" .env - sed -i "s@$3=.*@$3=\"$VALUE\"@g" .env - #sed -i 's/'"$3"'=.*/'"$3"'='"${VALUE}"'/' .env - #sed -i -e 's/'$3'=.*/'$3'="'"$VALUE"'"/g' .env - #sed -i "s/$3=.*/$3=$VALUE/g" .env -fi -} -function setConfig(){ -editVariable "$path" "$PWD" "path" -editVariable "$CONTAINER_NAME" "pf" "CONTAINER_NAME" -editVariable "$DOMAIN" "localhost" "DOMAIN" -editVariable "$SERVER_NAME" "CARLFINDER" "SERVER_NAME" -editVariable "$MYSQL_PASSWORD" "" "MYSQL_PASSWORD" -editVariable "$CCP_SSO_CLIENT_ID" "" "CCP_SSO_CLIENT_ID" -editVariable "$CCP_SSO_SECRET_KEY" "" "CCP_SSO_SECRET_KEY" -editVariable "$CCP_ESI_SCOPES" "esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1,esi-clones.read_clones.v1" "CCP_ESI_SCOPES" -source $CWD\.env -} - -while [[ $path == "" ]] || [[ $CONTAINER_NAME == "" ]] || [[ $DOMAIN == "" ]] || [[ $SERVER_NAME == "" ]] || [[ $MYSQL_PASSWORD == "" ]] || [[ $CCP_SSO_CLIENT_ID == "" ]] || [[ $CCP_SSO_SECRET_KEY == "" ]] || [[ $CCP_ESI_SCOPES == "" ]]; do - setConfig -done - -docker container inspect $CONTAINER_NAME > /dev/null 2>&1; -if [ $? -eq 1 ]; -then - declare -A menu=( [no]="NO" [yes]="YES") - wizzard "You did not build the container ! Do you want the setup to do it ? " - if [ ${menu[$UI_WIDGET_RC]} == "YES" ]; then - docker-compose build - tput clear; - fi -fi - -running=$(docker container inspect -f '{{.State.Status}}' $CONTAINER_NAME) -if [[ $running != "running" ]];then - declare -A menu=( [no]="NO" [yes]="YES") - wizzard "Do you want to run the container ?" - if [ ${menu[$UI_WIDGET_RC]} == "YES" ]; then - docker-compose up -d - fi -fi - -declare -A menu=( [no]="NO" [yes]="YES ") - cecho -c 'blue' "Do you want to import the eve_universe database ?"; - cecho -c 'red' "DISCLAIMER: Before you do that go to http://$DOMAIN/setup page (USERNAME:'pf' & password is your APP_PASSWORD) and hit create database, setup tables & fix column keys. After you did that select YES." - wizzard ""; -if [ ${menu[$UI_WIDGET_RC]} == "YES" ]; then -docker-compose exec pfdb /bin/sh -c "unzip -p eve_universe.sql.zip | mysql -u root -p\$MYSQL_ROOT_PASSWORD eve_universe"; -fi - diff --git a/static/nginx/nginx.conf b/static/nginx/nginx.conf index fbe77d6..3d6c056 100755 --- a/static/nginx/nginx.conf +++ b/static/nginx/nginx.conf @@ -110,7 +110,7 @@ http { client_max_body_size 8m; # This handles the client buffer size, meaning any POST actions sent to Nginx. POST actions are typically form submissions. - client_body_buffer_size 32k; + client_body_buffer_size 1M; output_buffers 2 32k; diff --git a/static/php/php.ini b/static/php/php.ini index eedddba..f9082d2 100755 --- a/static/php/php.ini +++ b/static/php/php.ini @@ -1,6 +1,6 @@ upload_max_filesize = 100M post_max_size = 108M -max_input_vars = 3000 +max_input_vars = 5000 html_errors = 0 cgi.force_redirect=0 cgi.fix_pathinfo=1 @@ -9,6 +9,7 @@ fastcgi.logging=0 request_terminate_timeout = 300 session.save_handler = redis session.save_path = "tcp://${CONTAINER_NAME}-redis:6379" +zend_extension=/usr/lib/php7/modules/xdebug.so [Date] date.timezone="UTC"