Merge branch 'greg2010-master'
Merges any changes from greg2010-master branch
This commit is contained in:
commit
6a14acb6dc
11 changed files with 136 additions and 50 deletions
20
.env.example
20
.env.example
|
|
@ -1,10 +1,26 @@
|
|||
PROJECT_ROOT=""
|
||||
CONTAINER_NAME="pf"
|
||||
DOMAIN=""
|
||||
# Emails from Let's Encrypt about your certificate will go here
|
||||
LE_EMAIL=""
|
||||
APP_PASSWORD=""
|
||||
MYSQL_HOST="mariadb"
|
||||
MYSQL_PORT="3306"
|
||||
MYSQL_USER="root"
|
||||
MYSQL_PASSWORD=""
|
||||
MYSQL_PF_DB_NAME="pathfinder"
|
||||
MYSQL_UNIVERSE_DB_NAME="eve_universe"
|
||||
MYSQL_CCP_DB_NAME="eve_lifeblood_min"
|
||||
REDIS_HOST="redis"
|
||||
REDIS_PORT="6379"
|
||||
CCP_SSO_CLIENT_ID=""
|
||||
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,esi-search.search_structures.v1"
|
||||
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"
|
||||
PATHFINDER_SOCKET_HOST="pathfinder-socket"
|
||||
PATHFINDER_SOCKET_PORT="5555"
|
||||
SMTP_HOST=""
|
||||
SMTP_PORT=""
|
||||
SMTP_SCHEME=""
|
||||
SMTP_USER=""
|
||||
SMTP_PASS=""
|
||||
SMTP_FROM=""
|
||||
SMTP_ERROR=""
|
||||
|
|
|
|||
48
.github/workflows/publish-docker.yaml
vendored
Normal file
48
.github/workflows/publish-docker.yaml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Create and publish a Docker image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME_OWNER: ${{ github.repository_owner }}
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: ./pathfinder.Dockerfile
|
||||
image_name: pathfinder
|
||||
- dockerfile: ./pf-websocket.Dockerfile
|
||||
image_name: pf-websocket
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_OWNER }}/${{ matrix.image_name }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
20
README.md
20
README.md
|
|
@ -51,11 +51,27 @@ A fork of techfreak's [Pathfinder-container](https://gitlab.com/techfreak/pathfi
|
|||
CONTAINER_NAME="pf" # docker container name prefix
|
||||
DOMAIN="" # The domain you will be using
|
||||
APP_PASSWORD="" # Password for /setup
|
||||
MYSQL_PASSWORD="" # Mysql Password
|
||||
MYSQL_HOST="mariadb" # mysql host
|
||||
MYSQL_PORT="3306" # default mysql port
|
||||
MYSQL_USER="root" # mysql root user
|
||||
MYSQL_PASSWORD="" # mysql Password
|
||||
CCP_SSO_CLIENT_ID="" # Use the SSO tokens created in step 1
|
||||
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"
|
||||
|
||||
MYSQL_PF_DB_NAME="pathfinder" # mysql pathfinder table name
|
||||
MYSQL_UNIVERSE_DB_NAME="eve_universe"
|
||||
MYSQL_CCP_DB_NAME="eve_lifeblood_min"
|
||||
REDIS_HOST="redis" # redis host
|
||||
REDIS_PORT="6379" # default redis port
|
||||
PATHFINDER_SOCKET_HOST="pathfinder-socket" # domain of the websocket container, relative to the main pf container
|
||||
PATHFINDER_SOCKET_PORT="5555" # default tcp socket port
|
||||
SMTP_HOST=""
|
||||
SMTP_PORT=""
|
||||
SMTP_SCHEME=""
|
||||
SMTP_USER=""
|
||||
SMTP_PASS=""
|
||||
SMTP_FROM=""
|
||||
SMTP_ERROR=""
|
||||
> 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
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ SEED = {{ md5(@SERVER.SERVER_NAME) }}
|
|||
; - Cache data is stored on disc
|
||||
; redis=[SERVER]
|
||||
; - Cache data is stored in Redis. redis=[host]:[port]:[db]:[auth] (e.g. redis=localhost:6379:1:myPass)
|
||||
CACHE = redis=${CONTAINER_NAME}-redis:6379
|
||||
CACHE = redis=${REDIS_HOST}:${REDIS_PORT}
|
||||
|
||||
; Cache backend for API data
|
||||
; This sets the cache backend for API response data and other temp data relates to API requests.
|
||||
|
|
|
|||
|
|
@ -5,18 +5,16 @@ services:
|
|||
image: bianjp/mariadb-alpine:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: $MYSQL_PASSWORD
|
||||
container_name: "$CONTAINER_NAME-db"
|
||||
networks:
|
||||
pf:
|
||||
aliases:
|
||||
- "${CONTAINER_NAME}db"
|
||||
- "$MYSQL_HOST"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- $PROJECT_ROOT/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip
|
||||
restart: always
|
||||
pf-redis:
|
||||
image: redis:6.2.5-alpine3.14
|
||||
container_name: "$CONTAINER_NAME-redis"
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
hostname: redis
|
||||
volumes:
|
||||
|
|
@ -24,27 +22,26 @@ services:
|
|||
networks:
|
||||
pf:
|
||||
aliases:
|
||||
- "$CONTAINER_NAME-redis"
|
||||
- "$REDIS_HOST"
|
||||
logging:
|
||||
driver: none
|
||||
restart: always
|
||||
pf-socket:
|
||||
image: composer:composer@sha256:d374b2e1f715621e9d9929575d6b35b11cf4a6dc237d4a08f2e6d1611f534675
|
||||
container_name: "$CONTAINER_NAME-socket"
|
||||
command: ["sh","-c","composer install && php cmd.php --tcpHost 0.0.0.0"]
|
||||
build:
|
||||
context: '.'
|
||||
dockerfile: '$PROJECT_ROOT/pf-websocket.Dockerfile'
|
||||
command: ["--tcpHost", "0.0.0.0"]
|
||||
hostname: socket
|
||||
volumes:
|
||||
- ${PROJECT_ROOT}/websocket:/app
|
||||
- ${PROJECT_ROOT}/logs:/var/www/html/pathfinder/history/map
|
||||
networks:
|
||||
pf:
|
||||
aliases:
|
||||
- "$CONTAINER_NAME-socket"
|
||||
- "$PATHFINDER_SOCKET_HOST"
|
||||
restart: always
|
||||
pf:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
hostname: "pathfinder"
|
||||
build: '.'
|
||||
build:
|
||||
context: '.'
|
||||
dockerfile: '$PROJECT_ROOT//pathfinder.Dockerfile'
|
||||
env_file:
|
||||
- .env
|
||||
labels:
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ FROM php:7.2.11-fpm-alpine3.7 as build
|
|||
RUN apk update \
|
||||
&& apk add --no-cache libpng-dev zeromq-dev git \
|
||||
$PHPIZE_DEPS \
|
||||
&& docker-php-ext-install gd && docker-php-ext-install pdo_mysql && pecl install redis && docker-php-ext-enable redis && pecl install channel://pecl.php.net/zmq-1.1.3 && docker-php-ext-enable zmq \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
&& docker-php-ext-install gd && docker-php-ext-install pdo_mysql && \
|
||||
pecl install redis && docker-php-ext-enable redis && \
|
||||
pecl install channel://pecl.php.net/zmq-1.1.3 && docker-php-ext-enable zmq && \
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
COPY pathfinder /app
|
||||
WORKDIR /app
|
||||
7
pf-websocket.Dockerfile
Normal file
7
pf-websocket.Dockerfile
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
FROM composer:2.3.10
|
||||
COPY websocket /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN composer install
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/php", "cmd.php"]
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
set -e
|
||||
crontab /var/crontab.txt
|
||||
envsubst '$DOMAIN' </etc/nginx/templateSite.conf >/etc/nginx/sites_enabled/site.conf
|
||||
envsubst '$CONTAINER_NAME' </etc/nginx/templateNginx.conf >/etc/nginx/nginx.conf
|
||||
envsubst '$PATHFINDER_SOCKET_HOST' </etc/nginx/templateNginx.conf >/etc/nginx/nginx.conf
|
||||
envsubst </var/www/html/pathfinder/app/templateEnvironment.ini >/var/www/html/pathfinder/app/environment.ini
|
||||
envsubst </var/www/html/pathfinder/app/templateConfig.ini >/var/www/html/pathfinder/app/config.ini
|
||||
envsubst </etc/zzz_custom.ini >/etc/php7/conf.d/zzz_custom.ini
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ http {
|
|||
}
|
||||
|
||||
upstream websocket {
|
||||
server ${CONTAINER_NAME}-socket:8020;
|
||||
server ${PATHFINDER_SOCKET_HOST}:8020;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,22 +15,22 @@ URL = {{@SCHEME}}://$DOMAIN
|
|||
; level of debug/error stack trace
|
||||
DEBUG = 0
|
||||
; Pathfinder database
|
||||
DB_PF_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
||||
DB_PF_NAME = pf
|
||||
DB_PF_USER = root
|
||||
DB_PF_DNS = mysql:host=${MYSQL_HOST};port=${MYSQL_PORT};dbname=
|
||||
DB_PF_NAME = $MYSQL_PF_DB_NAME
|
||||
DB_PF_USER = $MYSQL_USER
|
||||
DB_PF_PASS = $MYSQL_PASSWORD
|
||||
|
||||
; Universe data (New Eden) cache DB for ESI API respons
|
||||
DB_UNIVERSE_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
||||
DB_UNIVERSE_NAME = eve_universe
|
||||
DB_UNIVERSE_USER = root
|
||||
; Universe data (New Eden) cache DB for ESI API response
|
||||
DB_UNIVERSE_DNS = mysql:host=${MYSQL_HOST};port=${MYSQL_PORT};dbname=
|
||||
DB_UNIVERSE_NAME = $MYSQL_UNIVERSE_DB_NAME
|
||||
DB_UNIVERSE_USER = $MYSQL_USER
|
||||
DB_UNIVERSE_PASS = $MYSQL_PASSWORD
|
||||
|
||||
|
||||
; EVE-Online CCP Database export
|
||||
DB_CCP_DNS = mysql:host=${CONTAINER_NAME}db;port=3306;dbname=
|
||||
DB_CCP_NAME = eve_lifeblood_min
|
||||
DB_CCP_USER = root
|
||||
DB_CCP_DNS = mysql:host=${MYSQL_HOST};port=${MYSQL_PORT};dbname=
|
||||
DB_CCP_NAME = $MYSQL_CCP_DB_NAME
|
||||
DB_CCP_USER = $MYSQL_USER
|
||||
DB_CCP_PASS = $MYSQL_PASSWORD
|
||||
|
||||
; CCP SSO
|
||||
|
|
@ -47,15 +47,15 @@ CCP_ESI_SCOPES = $CCP_ESI_SCOPES
|
|||
CCP_ESI_SCOPES_ADMIN =
|
||||
|
||||
; SMTP settings (optional)
|
||||
SMTP_HOST = localhost
|
||||
SMTP_PORT = 25
|
||||
SMTP_SCHEME = TLS
|
||||
SMTP_USER =
|
||||
SMTP_PASS =
|
||||
SMTP_HOST = $SMTP_HOST
|
||||
SMTP_PORT = $SMTP_PORT
|
||||
SMTP_SCHEME = $SMTP_SCHEME
|
||||
SMTP_USER = $SMTP_USER
|
||||
SMTP_PASS = $SMTP_PASS
|
||||
|
||||
SMTP_FROM = registration@pathfinder-w.space
|
||||
SMTP_ERROR = admin@pathfinder-w.space
|
||||
SMTP_FROM = $SMTP_FROM
|
||||
SMTP_ERROR = $SMTP_EMAIL
|
||||
|
||||
; TCP Socket configuration (optional) (advanced)
|
||||
SOCKET_HOST = ${CONTAINER_NAME}-socket
|
||||
SOCKET_PORT = 5555
|
||||
SOCKET_HOST = $PATHFINDER_SOCKET_HOST
|
||||
SOCKET_PORT = $PATHFINDER_SOCKET_PORT
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ fastcgi.impersonate=1
|
|||
fastcgi.logging=0
|
||||
request_terminate_timeout = 300
|
||||
session.save_handler = redis
|
||||
session.save_path = "tcp://${CONTAINER_NAME}-redis:6379"
|
||||
session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}"
|
||||
[Date]
|
||||
date.timezone="UTC"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue