From 450a73711ce414f2079e1af9af735ddf7a0bfbe3 Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:02:29 +0100 Subject: [PATCH 1/7] Adding gitignore for geoipdb --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df025a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +geoip/GeoLite2-City.mmdb From 98f58787f0cd2a657fcd7e9f345a6d5ef64d814d Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:06:37 +0100 Subject: [PATCH 2/7] Added data to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index df025a4..39183b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ geoip/GeoLite2-City.mmdb +data/ From 99b0d9e7f35b84600265005a458639f80b8bdefc Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:07:57 +0100 Subject: [PATCH 3/7] Adding compose script for dev environmenty --- docker-compose-dev.yml | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docker-compose-dev.yml diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..602bea9 --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,58 @@ +include: + - openspy-web-backend/docker-compose.yaml + - openspy-core/docker-compose.yaml + - webservices/docker-compose.yaml +services: + nginx: + image: nginx:1-alpine + restart: on-failure + depends_on: + - authservices + - commerceservice + - competitionservice + - storageservice + ports: + - 80:80 + volumes: + - ./nginx-conf/default.conf:/etc/nginx/conf.d/default.conf + natneg-helper: + image: "chcniz/openspy-natneg-helper" + hostname: "natneg-helper" + restart: on-failure + depends_on: + - rabbit + environment: + RABBITMQ_URL: amqp://rabbitmq:rabbitmq@rabbit + UNSOLICITED_PORT_PROBE_DRIVER: 0.0.0.0:30695 + UNSOLICITED_IP_PROBE_DRIVER: unset + UNSOLICITED_IPPORT_PROBE_DRIVER: unset + SKIP_ERTL: 1 + qr-service: + image: "chcniz/openspy-qr-service" + hostname: "qr-service" + restart: on-failure + depends_on: + - rabbit + environment: + RABBITMQ_URL: amqp://rabbitmq:rabbitmq@rabbit + REDIS_URL: redis://redis:6379 + GEOIP_DB_PATH: /opt/GeoLite2-City.mmdb + volumes: + - ${PWD}/geoip/GeoLite2-City.mmdb:/opt/GeoLite2-City.mmdb + gamestats-web: + image: "chcniz/openspy-gamestats-web" + hostname: "gamestats-web" + restart: on-failure + environment: + GAMESTATS_MONGODB_URI: mongodb://OpenSpy:OpenSpy123@mongo:27017 + PORT: 4000 + stella-web: + image: "chcniz/openspy-bf2142-stella-web" + hostname: "stella-web" + restart: on-failure + environment: + API_KEY: ELGAoKHyFPfsWhmWF5F/8uNz2YcdTrojCZbRfvlFwBKJIhDUdvMwM4bmljSsEBq57riyXRij8FoqmxWR8C2BQIEaGG68uFJKcQmJlLY2ntAFOYUloccRCr/eBW8sJZsTIGaIdVdsDeDOrRJR487tfFGNHW2Ezp+oVrZVsd3C9e0VobSE1fXdSFz3R5MIqH3bLprfcDLJL/U8gtvUBegOQI22Vviha24W0/76SQSo72Z7i6GrpU/OnrsjcHQSwyC6VeCTv5JjCP/BSsaCK0Zxw3OlzQsPAprQug9Pwm5MrH/pkkxhqLKcCxjsU25Zj+ipkKOzsO+rmqaIMsK6ILke6w== + API_ENDPOINT: http://core-web:8080 + MONGODB_URI: mongodb://OpenSpy:OpenSpy123@mongo:27017 + PORT: 4000 + From e937d2165e1270f1f59c876fc173ffe3e19c1ae6 Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:12:39 +0100 Subject: [PATCH 4/7] Updating README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67cdaad..2045cdb 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,15 @@ This docker compose script can be used to run the basics of openspy. -Run it with `docker-compose -f docker-compose.yml up` \ No newline at end of file +Run it with `docker-compose -f docker-compose.yml up` + + +## Running a local dev environment + +To run a local dev environment, ensure that you have downloaded the geoip database and placed it in the geoip folder, then run the command `docker compose -f docker-compose-dev.yml up` +This will automatically create and build a full OpenSpy server for local development. + +## Redirecting to DEV OpenSpy +There are two methods to do this: +* add each domain you require to your hosts file. +* create a DNS server with a wildcard `A` record to point to your docker host. From 58302379b82ba285a0bf4665ca3392dab4641e2f Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:17:06 +0100 Subject: [PATCH 5/7] Updated README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2045cdb..81fbde7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Run it with `docker-compose -f docker-compose.yml up` ## Running a local dev environment +Clone this repo by running the command `git clone --recursive https://github.com/openspy/compose` To run a local dev environment, ensure that you have downloaded the geoip database and placed it in the geoip folder, then run the command `docker compose -f docker-compose-dev.yml up` This will automatically create and build a full OpenSpy server for local development. From 210817044fae1fc43df8e4b9577afedd41d3378f Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 08:36:40 +0100 Subject: [PATCH 6/7] Added natneg This makes it autobuild --- .gitmodules | 3 +++ docker-compose-dev.yml | 2 +- docker-compose.yml | 4 ++-- natneg | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) create mode 160000 natneg diff --git a/.gitmodules b/.gitmodules index 842ca23..62a6020 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "webservices"] path = webservices url = https://github.com/openspy/webservices.git +[submodule "natneg"] + path = natneg + url = https://github.com/openspy/natneg-helper diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 602bea9..ec8fd61 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -16,7 +16,7 @@ services: volumes: - ./nginx-conf/default.conf:/etc/nginx/conf.d/default.conf natneg-helper: - image: "chcniz/openspy-natneg-helper" + build: "./natneg" hostname: "natneg-helper" restart: on-failure depends_on: diff --git a/docker-compose.yml b/docker-compose.yml index bb5552c..5e0948e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: volumes: - ./nginx-conf/default.conf:/etc/nginx/conf.d/default.conf natneg-helper: - image: "chcniz/openspy-natneg-helper" + build: "./natneg" hostname: "natneg-helper" restart: on-failure depends_on: @@ -54,4 +54,4 @@ services: API_KEY: ELGAoKHyFPfsWhmWF5F/8uNz2YcdTrojCZbRfvlFwBKJIhDUdvMwM4bmljSsEBq57riyXRij8FoqmxWR8C2BQIEaGG68uFJKcQmJlLY2ntAFOYUloccRCr/eBW8sJZsTIGaIdVdsDeDOrRJR487tfFGNHW2Ezp+oVrZVsd3C9e0VobSE1fXdSFz3R5MIqH3bLprfcDLJL/U8gtvUBegOQI22Vviha24W0/76SQSo72Z7i6GrpU/OnrsjcHQSwyC6VeCTv5JjCP/BSsaCK0Zxw3OlzQsPAprQug9Pwm5MrH/pkkxhqLKcCxjsU25Zj+ipkKOzsO+rmqaIMsK6ILke6w== API_ENDPOINT: http://core-web:8080 MONGODB_URI: mongodb://OpenSpy:OpenSpy123@mongo:27017 - PORT: 4000 \ No newline at end of file + PORT: 4000 diff --git a/natneg b/natneg new file mode 160000 index 0000000..c0ba2aa --- /dev/null +++ b/natneg @@ -0,0 +1 @@ +Subproject commit c0ba2aafd15f84a9812a644e5255f59ef08979e4 From d12b7ed3328b57850c6fa42ceec2ad00b8de841a Mon Sep 17 00:00:00 2001 From: Blitztide Date: Sat, 28 Jun 2025 09:37:09 +0100 Subject: [PATCH 7/7] Added qr.service --- .gitmodules | 3 +++ docker-compose-dev.yml | 4 +++- qr.service | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 qr.service diff --git a/.gitmodules b/.gitmodules index 62a6020..9ed3286 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "natneg"] path = natneg url = https://github.com/openspy/natneg-helper +[submodule "qr.service"] + path = qr.service + url = https://github.com/openspy/qr.service diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index ec8fd61..cc56f6b 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -28,17 +28,19 @@ services: UNSOLICITED_IPPORT_PROBE_DRIVER: unset SKIP_ERTL: 1 qr-service: - image: "chcniz/openspy-qr-service" + build: "./qr.service" hostname: "qr-service" restart: on-failure depends_on: - rabbit + - redis environment: RABBITMQ_URL: amqp://rabbitmq:rabbitmq@rabbit REDIS_URL: redis://redis:6379 GEOIP_DB_PATH: /opt/GeoLite2-City.mmdb volumes: - ${PWD}/geoip/GeoLite2-City.mmdb:/opt/GeoLite2-City.mmdb + entrypoint: "sleep 30 && npm run start" gamestats-web: image: "chcniz/openspy-gamestats-web" hostname: "gamestats-web" diff --git a/qr.service b/qr.service new file mode 160000 index 0000000..303ee36 --- /dev/null +++ b/qr.service @@ -0,0 +1 @@ +Subproject commit 303ee361b57b30a6f86247bb4f719f03e2b5271a