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/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/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 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..740aacb 160000 --- a/pathfinder +++ b/pathfinder @@ -1 +1 @@ -Subproject commit 0673759a8d1cd18a0a14ed871d3754011cef3633 +Subproject commit 740aacb539f06a7a64bc7262bb91ed72afedd504 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