From 2a31f54e8b006e58d2b3ee2d5b57d9699db97734 Mon Sep 17 00:00:00 2001 From: Zachary Laughlin <33877007+ZaxLofful@users.noreply.github.com> Date: Mon, 10 Jul 2023 01:36:20 -0700 Subject: [PATCH 1/4] Do a little cleaning There are a few inconsistencies in the way code is written and also a volume that isn't needed. There is also a spacing problem for the .env file, which docker-compose hates --- docker-compose.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e265cb6..8ae6623 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: "3.9" services: pfdb: @@ -36,10 +36,10 @@ services: - "$PATHFINDER_SOCKET_HOST" restart: always pf: - hostname: "pathfinder" + hostname: pathfinder image: ghcr.io/goryn-clade/pathfinder:latest env_file: - - .env + - .env labels: - "traefik.enable=true" - "traefik.docker.network=web" @@ -68,8 +68,8 @@ services: - pf-socket restart: always traefik: - image: "traefik:v2.3" - container_name: "traefik" + image: traefik:v2.3 + container_name: traefik command: - "--log.level=ERROR" - "--api.insecure=true" @@ -95,10 +95,9 @@ services: restart: always volumes: - data: db_data: redis_data: networks: pf: web: - external: true \ No newline at end of file + external: true From 85f1c7754fdf9edb882f8c462b72e0a7655a28d2 Mon Sep 17 00:00:00 2001 From: Zachary Laughlin <33877007+ZaxLofful@users.noreply.github.com> Date: Mon, 10 Jul 2023 01:51:48 -0700 Subject: [PATCH 2/4] change to container_name Hostname only applies to DNS resolution inside the container itself, it doesn't affect the routing of outside networks or other containers. Setting container_name will set both the name of the container and the Docker Internal DNS routing of all containers to the generic name. Thus achieving both naming convention and DNS resolution. --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8ae6623..72ff847 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: pf-redis: image: redis:6.2.5-alpine3.14 command: ["redis-server", "--appendonly", "yes"] - hostname: redis + container_name: redis volumes: - redis_data:/data networks: @@ -29,14 +29,14 @@ services: pf-socket: image: ghcr.io/goryn-clade/pf-websocket:latest command: ["--tcpHost", "0.0.0.0"] - hostname: socket + container_name: socket networks: pf: aliases: - "$PATHFINDER_SOCKET_HOST" restart: always pf: - hostname: pathfinder + container_name: pathfinder image: ghcr.io/goryn-clade/pathfinder:latest env_file: - .env From 2b44fd284e9e8c6284dbcf7b82d5b102e8ba68bc Mon Sep 17 00:00:00 2001 From: Zachary Laughlin <33877007+ZaxLofful@users.noreply.github.com> Date: Mon, 10 Jul 2023 01:59:00 -0700 Subject: [PATCH 3/4] Add timezone to containers to keep them in sync Also, fix some white spacing issues as well at the volume db level. --- docker-compose.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 72ff847..8850200 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,10 @@ services: aliases: - "$MYSQL_HOST" volumes: - - db_data:/var/lib/mysql - - ./pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip + - 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-redis: image: redis:6.2.5-alpine3.14 @@ -19,6 +21,8 @@ services: container_name: redis volumes: - redis_data:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro networks: pf: aliases: @@ -34,6 +38,9 @@ services: pf: aliases: - "$PATHFINDER_SOCKET_HOST" + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro restart: always pf: container_name: pathfinder @@ -62,6 +69,8 @@ services: - ./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-redis @@ -88,8 +97,10 @@ services: - "443:443" - "8080:8080" volumes: - - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "./letsencrypt:/letsencrypt" + - /var/run/docker.sock:/var/run/docker.sock:ro + - ./letsencrypt:/letsencrypt + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro networks: - web restart: always From 8ce4110f570e79d9c0cde2c4b257e0c0c5bc6a3f Mon Sep 17 00:00:00 2001 From: Zachary Laughlin <33877007+ZaxLofful@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:19:15 -0700 Subject: [PATCH 4/4] Don't need the build command No longer needed, since we build them ahead of time ourselves. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6751fa..367cb09 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ A fork of techfreak's [Pathfinder-container](https://gitlab.com/techfreak/pathfi 1. **Build & Run it** ```shell - docker network create web && docker-compose up -d --build + docker network create web && docker-compose up -d ``` 1. **Open the http://< your-domain >/setup page.**