Pathfinder – Using The Existing Redis
Pathfinder comes in 4 docker images
- Pathfinder
- Pathfinder Websocket
- Mariadb
- Redis
If you are running SeAT 5.0, Mariadb and Redis are already installed. Can we use the existing services? Yes.
Redis – Accepting The External Connection
The default installation is probably only bound to the localhost (127.0.0.1). You need to bind it to a host IP. you will find /etc/redis/redis.conf.
bind 127.0.0.1 -::1 192.168.100.100
You need to adjust the private network address to your environment, but this will bind your redis server to a host ip address.
Reconfig docker-compose.yml
Then, you remove all redis part from docker-compose.yml
Again, I have removed traefik to use apache. See the previous posts for that.
version: "3.9"
services:
pfdb:
image: bianjp/mariadb-alpine:latest
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_PASSWORD
networks:
pf:
aliases:
- "$MYSQL_HOST"
volumes:
- db_data:/var/lib/mysql
- ./pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: always
pf-socket:
image: ghcr.io/goryn-clade/pf-websocket:latest
command: ["--tcpHost", "0.0.0.0"]
container_name: socket
networks:
pf:
aliases:
- "$PATHFINDER_SOCKET_HOST"
volumes:
- ./logs:/var/www/html/pathfinder/history/map
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: always
pf:
container_name: pathfinder
image: ghcr.io/goryn-clade/pathfinder:latest
env_file:
- .env
networks:
- pf
ports:
- "8081:80"
healthcheck:
disable: true
volumes:
- ./config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini
- ./config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini
- ./config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini
- ./logs:/var/www/html/pathfinder/history/map
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- pfdb
- pf-socket
restart: always
volumes:
db_data:
networks:
pf:
You also need to edit .env to change
REDIS_HOST="192.168.100.100"
Then, rebuild the docker image and run using
$> docker compose up -d
Final Thoughts
Do I do this in the production environment. No.
- To ensure comptibility, I would use the one come with pathfinder.
- To reduce the security risk, I wouldn’t bind redis other than local host.
If we follow similar steps, we can connect to the existing database, but I haven’t succeeded yet. PHP 7.2 Pathfinder docker image is using doesn’t support MySQL caching_sha2_password. It’s about how much security risk you want to take.