From 3067f09bcab562e079c7e8b689c7d75f4aaf9d3a Mon Sep 17 00:00:00 2001 From: fleischsalatinspace Date: Wed, 22 Sep 2021 18:02:17 +0200 Subject: [PATCH 1/4] Dockerfile/entrypoint.sh: move templateSite.conf to /etc/nginx to prevent double files in sites_enabled --- Dockerfile | 4 +++- static/entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f76d0c2..e149c2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,9 @@ FROM trafex/alpine-nginx-php7:ba1dd422 RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf -COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf +# we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst +RUN mkdir -p /etc/nginx/sites_enabled/ +COPY static/nginx/site.conf /etc/nginx/templateSite.conf # Configure PHP-FPM COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf diff --git a/static/entrypoint.sh b/static/entrypoint.sh index 008e74a..f627dfd 100644 --- a/static/entrypoint.sh +++ b/static/entrypoint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e crontab /var/crontab.txt -envsubst '$DOMAIN' /etc/nginx/sites_enabled/site.conf +envsubst '$DOMAIN' /etc/nginx/sites_enabled/site.conf envsubst '$CONTAINER_NAME' /etc/nginx/nginx.conf envsubst /var/www/html/pathfinder/app/environment.ini envsubst /var/www/html/pathfinder/app/config.ini From dac7e4adf5b866283310458741a3efeb3a424df2 Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Sun, 24 Oct 2021 20:24:13 +1300 Subject: [PATCH 2/4] Fixes double nginx config --- development/Dockerfile.development | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/development/Dockerfile.development b/development/Dockerfile.development index 8fe1dd6..a97ac3b 100644 --- a/development/Dockerfile.development +++ b/development/Dockerfile.development @@ -16,7 +16,9 @@ FROM trafex/alpine-nginx-php7:ba1dd422 RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf -COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf +# we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst +RUN mkdir -p /etc/nginx/sites_enabled/ +COPY static/nginx/site.conf /etc/nginx/templateSite.conf # Configure PHP-FPM COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf From d3b9ef58585b595c1253ec196ef28a3cc1872e76 Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Mon, 25 Oct 2021 07:19:55 +1300 Subject: [PATCH 3/4] Fixes letsencrypt cert storage and updates env --- .env.example | 2 +- Dockerfile | 4 +--- README.md | 5 ++++- config/pathfinder/pathfinder.ini | 4 ++-- config/pathfinder/plugin.ini | 1 - development/docker-compose.development.yml | 10 +++++----- development/environment.development.ini | 1 + docker-compose.yml | 14 +++++++------- pathfinder | 2 +- 9 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.env.example b/.env.example index 4d1ff93..fdf6057 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -path="" +PROJECT_ROOT="" CONTAINER_NAME="pf" DOMAIN="" APP_PASSWORD="" diff --git a/Dockerfile b/Dockerfile index e149c2e..f76d0c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,9 +16,7 @@ FROM trafex/alpine-nginx-php7:ba1dd422 RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf -# we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst -RUN mkdir -p /etc/nginx/sites_enabled/ -COPY static/nginx/site.conf /etc/nginx/templateSite.conf +COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf # Configure PHP-FPM COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf diff --git a/README.md b/README.md index 6a915e1..e6ee172 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ A fork of techfreak's [Pathfinder-container](https://gitlab.com/techfreak/pathfi 1. **Create a *.env* file (copy .env.example) and make sure every config option has an entry.** ```shell - path="" # The path of the cloned repo + PROJECT_ROOT="" # The path of the cloned repo CONTAINER_NAME="pf" # docker container name prefix DOMAIN="" # The domain you will be using APP_PASSWORD="" # Password for /setup @@ -55,6 +55,9 @@ A fork of techfreak's [Pathfinder-container](https://gitlab.com/techfreak/pathfi CCP_SSO_SECRET_KEY="" 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,esi-characters.read_corporation_roles.v1" + The `PROJECT_ROOT` key is the *absolute* path to the project directory, ie if you have clone it to /app/pathfinder-containers, this is the value you should enter. If you're unsure of the absolute path, you can use the command `pwd` to get the full absolute path of the current directory. + + 1. **Edit the *config/pathfinder/pathfinder.ini*** to your liking Recommended options to change: diff --git a/config/pathfinder/pathfinder.ini b/config/pathfinder/pathfinder.ini index 195b910..0974447 100644 --- a/config/pathfinder/pathfinder.ini +++ b/config/pathfinder/pathfinder.ini @@ -13,8 +13,8 @@ NAME = Pathfinder Community Edition ; 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.1.3 -VERSION = v2.1.3 +; Default: v2.1.4 +VERSION = v2.1.4 ; Contact information [optional] ; Shown on 'licence', 'contact' page. diff --git a/config/pathfinder/plugin.ini b/config/pathfinder/plugin.ini index ccc892b..694c48a 100644 --- a/config/pathfinder/plugin.ini +++ b/config/pathfinder/plugin.ini @@ -4,4 +4,3 @@ MODULES_ENABLED = 1 [PLUGIN.MODULES] DEMO = ./app/ui/module/demo EMPTY = ./app/ui/module/empty -ZKILLTEST = ./app/ui/module/global_killboard diff --git a/development/docker-compose.development.yml b/development/docker-compose.development.yml index f6c4232..a51a1c1 100644 --- a/development/docker-compose.development.yml +++ b/development/docker-compose.development.yml @@ -12,7 +12,7 @@ services: - "${CONTAINER_NAME}db" volumes: - db_data:/var/lib/mysql - - $path/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip + - $PROJECT_ROOT/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip restart: always pf-redis: image: redis:6.2.5-alpine3.14 @@ -34,7 +34,7 @@ services: command: ["sh","-c","composer install && php cmd.php --tcpHost 0.0.0.0"] hostname: socket volumes: - - ${path}/websocket:/app + - ${PROJECT_ROOT}/websocket:/app networks: pf: aliases: @@ -63,9 +63,9 @@ services: healthcheck: disable: true volumes: - - ${path}/config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini - - ${path}/config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini - - ${path}/config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini + - ${PROJECT_ROOT}/config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini + - ${PROJECT_ROOT}/config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini + - ${PROJECT_ROOT}/config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini depends_on: - pfdb - pf-redis diff --git a/development/environment.development.ini b/development/environment.development.ini index ec68aa3..c65ced1 100644 --- a/development/environment.development.ini +++ b/development/environment.development.ini @@ -37,6 +37,7 @@ DB_CCP_PASS = $MYSQL_PASSWORD CCP_SSO_URL = https://login.eveonline.com CCP_SSO_CLIENT_ID = $CCP_SSO_CLIENT_ID CCP_SSO_SECRET_KEY = $CCP_SSO_SECRET_KEY +CCP_SSO_JWK_CLAIM = login.eveonline.com CCP_SSO_DOWNTIME = 11:00 ; CCP ESI API diff --git a/docker-compose.yml b/docker-compose.yml index f159a7d..5b1fca3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - "${CONTAINER_NAME}db" volumes: - db_data:/var/lib/mysql - - $path/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip + - $PROJECT_ROOT/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip restart: always pf-redis: image: redis:6.2.5-alpine3.14 @@ -34,7 +34,7 @@ services: command: ["sh","-c","composer install && php cmd.php --tcpHost 0.0.0.0"] hostname: socket volumes: - - ${path}/websocket:/app + - ${PROJECT_ROOT}/websocket:/app networks: pf: aliases: @@ -64,9 +64,9 @@ services: healthcheck: disable: true volumes: - - ${path}/config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini - - ${path}/config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini - - ${path}/config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini + - ${PROJECT_ROOT}/config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini + - ${PROJECT_ROOT}/config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini + - ${PROJECT_ROOT}/config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini depends_on: - pfdb - pf-redis @@ -84,17 +84,17 @@ services: - "--entrypoints.websecure.address=:443" - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true" - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web" + - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json" # Remove below line when ready for production - "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" - "--certificatesresolvers.letsencrypt.acme.email=MYEMAIL@someemailprobablygmail.com" - - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json" ports: - "80:80" - "443:443" - "8080:8080" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "${path}/letsencrypt:/letsencrypt" + - "${PROJECT_ROOT}/letsencrypt:/letsencrypt" networks: - web restart: always diff --git a/pathfinder b/pathfinder index 0673759..305c900 160000 --- a/pathfinder +++ b/pathfinder @@ -1 +1 @@ -Subproject commit 0673759a8d1cd18a0a14ed871d3754011cef3633 +Subproject commit 305c9009e223ff20e60a4a7746c503994e8f3baa From 80028302fbe398b1b5bd7c75d2efff35db51646c Mon Sep 17 00:00:00 2001 From: Sam ONeill Date: Mon, 25 Oct 2021 13:56:15 +1300 Subject: [PATCH 4/4] Updates Pathfinder Submodule target --- pathfinder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathfinder b/pathfinder index 305c900..740aacb 160000 --- a/pathfinder +++ b/pathfinder @@ -1 +1 @@ -Subproject commit 305c9009e223ff20e60a4a7746c503994e8f3baa +Subproject commit 740aacb539f06a7a64bc7262bb91ed72afedd504