Dockerfile for running Pathfinder, the mapping tool for EVE Online.
Traefik 1.7 Installation
Websocket server support.
Added Event Extension Installation Guide
Added guide to change - character_set_server = latin1 to character_set_server = utf8mb4
sudo apt install -y httpd-tools
htpasswd -nb admin secure_password
- Save the Output given for the Above, You'll need this in Step 7. It should look like this:
admin:$apr1$kEG/8JKj$yEXj8vKO7HDvkUMI/SbOO.
- Make a Directory for Trafik and
cd
into it. nano traefik.toml
- Paste the above Admin Secure Password in the
users = ["admin:your_encrypted_password"]
section: Keep quotations just replace the(Your_Encrypted_Password)
Replace"your_domain"
with your domain, keep quotations.
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.dashboard]
address = ":8080"
[entryPoints.dashboard.auth]
[entryPoints.dashboard.auth.basic]
users = ["admin:your_encrypted_password"]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[api]
entrypoint="dashboard"
[acme]
email = "your_email@your_domain"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
[docker]
domain = "your_domain"
watch = true
network = "pathfinder_default"
- Save the file and move onto the next step.
In the Traefik Folder you created follow these steps
docker network create pathfinder_default
touch acme.json
chmod 600 acme.json
- Copy and past the following into a text editor beforehand and edit
(monitor.your_domain)
to your desired address. Then copy and paste back into your terminal and pressenter
to run the docker.
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/traefik.toml:/traefik.toml \
-v $PWD/acme.json:/acme.json \
-p 80:80 \
-p 443:443 \
-l traefik.frontend.rule=Host:monitor.your_domain \
-l traefik.port=8080 \
--network pathfinder_default \
--name traefik \
traefik:1.7.21-alpine
If all has gone well you should have a Traefik container up and running and set up ready for the next steps.
- Clone
docker-compose.yml
file
sudo wget https://raw.githubusercontent.com/SteveTh3Piirate/pathfinder-docker/master/docker-compose.yml
Open the above file using a text editor and go down to line 31 and edit the label - traefik.frontend.rule=Host:
It will currently show as - traefik.frontend.rule=Host:pathfinder.(YourDomain)
Edit this to match your actual domain for example - traefik.frontend.rule=Host:pathfinder.steveth3piirate.com
- Clone the example
.env
file
sudo wget https://raw.githubusercontent.com/SteveTh3Piirate/pathfinder-docker/master/.env
- Fill out the
.env
file and start up your instance
sudo docker-compose up -d
You may need to create the databases for your MYSQL image if using a fresh compose.
sudo docker-compose exec db /bin/bash
mysql -uroot -p
CREATE DATABASE pathfinder;
CREATE DATABASE eve_universe;
- Navigate to your Pathfinder page, go through setup.
- Create the databases using the database controls in the setup page.
- Import static database.
- Import from ESI at the Cronjob section of the setup page.
- Build Systems data index under
Build search index
in the Administration section of the setup page. - At the bottom after your databases are build and filled scroll down and import static data. Since v2.0 manual imports through .zip are no longer necessary.
- You're live!
- Exec into the pathfinder docker with
docker exec -it pathfinder /bin/bash
- install apache2-utils
apt-get install apache2-utils
apt-get update && apt-get install nano
- now
cd /etc/nginx/sites-enabled/
nano default
And scroll all the way to the bottom and add this next block of code to the file.
location /setup {
auth_basic "Setup Login";
auth_basic_user_file /etc/nginx/.setup_pass;
try_files $uri $uri/ /index.php?$query_string;
}
- Now create the user/pass for the setup page with the following. Change the Username!
htpasswd -c /etc/nginx/.setup_pass (YourUsername)
- Removing the Setup Warning.
cd /var/www/pathfinder/app/
- Nano into pathfinder.ini
nano pathfinder.ini
- Scroll down until you see
SHOW_SETUP_WARNING = 1
Simply Change the 1 to 0. - Now your SetUp page is secure and you wont have a warning all the time.
- In future you'd get to the setup page with /setup at the end of your chosen link pathfinder.yourdomain.com/setup
- exec into the pathfinder docker container
docker exec -it pathfinder /bin/bash
apt-get update && apt-get install nano
- cd into the php directory with
cd /etc/php/7.2/fpm/
- Nano into the php.ini with
nano php.ini
- ctrl+w and search for the first
html_errors
and turn the "on" to "off" and search for the nexthtml_errors
and do the same as prior. - restart fpm service with
service php7.2-fpm restart
- Check on the setup page that hmtl errors is marked as a 0 instead of a 1.
In the docker image the dedfault character_set_server is set to latin 1, here i will tell you how to adjust it to utf8mb4.
- exec into the docker containing the db in my case its
docker exec -it pathfinder_db_1 /bin/bash
- Make sure to update packages as we will need to install nano so
apt-get install update
- Next install nano
apt-get install nano
- Now cd to the mysqld.conf which should be
cd /etc/mysql/mysql.conf.d/
- Now
nano mysqld.conf
- Scroll down to the bottom and add the following to lines on their own line
skip-character-set-client-handshake
character-set-server=utf8mb4
- now ctrl+x save the buffer and then exit, now we need to restart mysql with the following
service mysql restart
- refresh your page and note that latin1 has now been replaced with the correct type.
- In the cli type
docker exec -it pathfinder /bin/bash
or whatever your docker host name may be. - update packages by
sudo apt-get update
- Follow the below Text to install the EventLibrary which will install Event Extension 3.0.4 for Php 7.2
apt-get install php7.2-dev
apt-get install libevent-dev
pecl install ev
pecl install event
sudo echo 'extension=ev.so' > /etc/php/7.2/mods-available/ev.ini
sudo echo 'extension=event.so' > /etc/php/7.2/mods-available/event.ini
sudo ln -s /etc/php/7.2/mods-available/ev.ini /etc/php/7.2/fpm/conf.d/20-ev.ini
sudo ln -s /etc/php/7.2/mods-available/ev.ini /etc/php/7.2/cli/conf.d/20-ev.ini
sudo ln -s /etc/php/7.2/mods-available/event.ini /etc/php/7.2/fpm/conf.d/20-event.ini
sudo ln -s /etc/php/7.2/mods-available/event.ini /etc/php/7.2/cli/conf.d/20-event.ini
##WANRING! Segmentation fault on PHP 7.2.11-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Oct 24 2019 18:23:23) ( NTS ) ##
sudo echo 'extension=libevent.so' > /etc/php/7.2/mods-available/libevent.ini
sudo ln -s /etc/php/7.2/mods-available/libevent.ini /etc/php/7.2/fpm/conf.d/20-libevent.ini
sudo ln -s /etc/php/7.2/mods-available/libevent.ini /etc/php/7.2/cli/conf.d/20-libevent.ini
php -i | grep -i ev
php -i | grep -i event
sudo service php7.2-fpm restart
During Refresh of setup page you will see an error, dont panic! Refresh your Pathfinder Setup page a few times and you should see the event library installed to 3.0.4