diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39183b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +geoip/GeoLite2-City.mmdb +data/ diff --git a/.gitmodules b/.gitmodules index 842ca23..9ed3286 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "webservices"] path = webservices url = https://github.com/openspy/webservices.git +[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/README.md b/README.md index 67cdaad..81fbde7 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,16 @@ 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 + +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. + +## 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. diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..cc56f6b --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,60 @@ +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: + build: "./natneg" + 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: + 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" + 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 + 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 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