fixes dev env

This commit is contained in:
Sam ONeill 2024-04-25 13:07:39 +12:00
parent 665b647cd2
commit aeb02beb18
5 changed files with 33 additions and 37 deletions

View file

@ -1,25 +1,26 @@
APP_PASSWORD="DEVPASSWORD" DOMAIN=""
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"LE_EMAIL="" # Emails from Let's Encrypt about your certificate will go here
CCP_SSO_CLIENT_ID="bebbf51a1bbc4189b07f4fd7ba10a9b9" LE_EMAIL=""
CCP_SSO_SECRET_KEY="NZDMwbVMHOD3dZdhPIFtQq8wHVZDouEK60I6IXau" APP_PASSWORD=""
DOMAIN="localhost"
MYSQL_CCP_DB_NAME="eve_lifeblood_min"
MYSQL_HOST="mariadb" MYSQL_HOST="mariadb"
MYSQL_PASSWORD="PASSWORD"
MYSQL_PF_DB_NAME="pathfinder"
MYSQL_PORT="3306" MYSQL_PORT="3306"
MYSQL_UNIVERSE_DB_NAME="eve_universe"
MYSQL_USER="root" MYSQL_USER="root"
PATHFINDER_SOCKET_HOST="pathfinder-socket" MYSQL_PASSWORD=""
PATHFINDER_SOCKET_PORT="5555" MYSQL_PF_DB_NAME="pathfinder"
MYSQL_UNIVERSE_DB_NAME="eve_universe"
MYSQL_CCP_DB_NAME="eve_lifeblood_min"
REDIS_HOST="redis" REDIS_HOST="redis"
REDIS_PORT="6379" REDIS_PORT="6379"
SERVER_NAME="PFDEV" CCP_SSO_CLIENT_ID=""
SMTP_ERROR="" CCP_SSO_SECRET_KEY=""
SMTP_FROM="" 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"
PATHFINDER_SOCKET_HOST="pathfinder-socket"
PATHFINDER_SOCKET_PORT="5555"
SMTP_HOST="" SMTP_HOST=""
SMTP_PASS=""
SMTP_PORT="" SMTP_PORT=""
SMTP_SCHEME="" SMTP_SCHEME=""
SMTP_USER="" SMTP_USER=""
SMTP_PASS=""
SMTP_FROM=""
SMTP_ERROR=""
XDEBUG_CONFIG="remote_host=host.docker.internal remote_port=9000 remote_enable=1" XDEBUG_CONFIG="remote_host=host.docker.internal remote_port=9000 remote_enable=1"

View file

@ -42,11 +42,12 @@ services:
- ./logs:/var/www/html/pathfinder/history/map - ./logs:/var/www/html/pathfinder/history/map
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
restart: always restart: always
pf: pf:
container_name: pathfinder container_name: pathfinder
image: ghcr.io/goryn-clade/pathfinder:latest build:
context: '.'
dockerfile: pathfinder.Dockerfile
env_file: env_file:
- .env - .env
labels: labels:
@ -58,7 +59,6 @@ services:
- "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.pf-secure.entrypoints=websecure" - "traefik.http.routers.pf-secure.entrypoints=websecure"
- "traefik.http.routers.pf-secure.tls=true" - "traefik.http.routers.pf-secure.tls=true"
- "traefik.http.routers.pf-secure.tls.certresolver=letsencrypt"
- "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https" - "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https"
- "traefik.http.routers.pf.middlewares=redirecthttps" - "traefik.http.routers.pf.middlewares=redirecthttps"
networks: networks:
@ -88,19 +88,12 @@ services:
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443" - "--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" # Remove this line only
- "--certificatesresolvers.letsencrypt.acme.email=${LE_EMAIL}"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
- "8080:8080" - "8080:8080"
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./letsencrypt:/letsencrypt
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks: networks:

View file

@ -16,12 +16,7 @@ RUN composer install
FROM trafex/alpine-nginx-php7:ba1dd422 FROM trafex/alpine-nginx-php7:ba1dd422
RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql \ RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo php7-event shadow gettext bash apache2-utils logrotate
php7-fileinfo php7-event shadow gettext bash apache2-utils logrotate ca-certificates
# fix expired DST Cert
RUN sed -i '/^mozilla\/DST_Root_CA_X3.crt$/ s/^/!/' /etc/ca-certificates.conf \
&& update-ca-certificates
# symlink nginx logs to stdout/stderr for supervisord # symlink nginx logs to stdout/stderr for supervisord
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ RUN ln -sf /dev/stdout /var/log/nginx/access.log \
@ -36,6 +31,12 @@ COPY static/nginx/site.conf /etc/nginx/templateSite.conf
# Configure PHP-FPM # Configure PHP-FPM
COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
# 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 COPY static/php/php.ini /etc/zzz_custom.ini
# configure cron # configure cron
COPY static/crontab.txt /var/crontab.txt COPY static/crontab.txt /var/crontab.txt

View file

@ -13,7 +13,7 @@ BASE =
; deployment URL (e.g. https://www.pathfinder-w.space) ; deployment URL (e.g. https://www.pathfinder-w.space)
URL = {{@SCHEME}}://$DOMAIN URL = {{@SCHEME}}://$DOMAIN
; level of debug/error stack trace ; level of debug/error stack trace
DEBUG = 0 DEBUG = 3
; Pathfinder database ; Pathfinder database
DB_PF_DNS = mysql:host=${MYSQL_HOST};port=${MYSQL_PORT};dbname= DB_PF_DNS = mysql:host=${MYSQL_HOST};port=${MYSQL_PORT};dbname=
DB_PF_NAME = $MYSQL_PF_DB_NAME DB_PF_NAME = $MYSQL_PF_DB_NAME

View file

@ -10,6 +10,7 @@ fastcgi.logging=0
request_terminate_timeout = 300 request_terminate_timeout = 300
session.save_handler = redis session.save_handler = redis
session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}" session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}"
zend_extension=/usr/lib/php7/modules/xdebug.so
[Date] [Date]
date.timezone="UTC" date.timezone="UTC"