From 5838ed2381caef6300e1de1e0e34e3f6d37f7746 Mon Sep 17 00:00:00 2001 From: Daniel Villavicencio <48806616+dvillavicencio@users.noreply.github.com> Date: Mon, 6 May 2024 15:54:14 -0700 Subject: [PATCH] Remove host from environment variables (#86) --- .github/workflows/deployment.yml | 2 -- ...tiny2botApplication.java => RivenBotApplication.java} | 4 ++-- src/main/resources/application-local.yml | 7 +++++++ src/main/resources/application-prod.yml | 9 ++++++++- src/main/resources/application.yml | 2 -- 5 files changed, 17 insertions(+), 7 deletions(-) rename src/main/java/com/deahtstroke/rivenbot/{Destiny2botApplication.java => RivenBotApplication.java} (96%) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e450cd0..470cead 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -132,8 +132,6 @@ jobs: echo "DISCORD_BOT_PUBLIC_KEY=${{ secrets.DISCORD_BOT_PUBLIC_KEY }}" >> .env echo "MONGO_DB_ROOT_USERNAME=${{ secrets.MONGO_INITDB_ROOT_USERNAME }}" >> .env echo "MONGO_DB_ROOT_PASSWORD=${{ secrets.MONGO_INITDB_ROOT_PASSWORD }}" >> .env - echo "MONGO_DB_HOST=${{ secrets.MONGO_DB_HOST }}" >> .env - echo "REDIS_HOST=${{ secrets.REDIS_HOST }}" >> .env chmod 600 .env diff --git a/src/main/java/com/deahtstroke/rivenbot/Destiny2botApplication.java b/src/main/java/com/deahtstroke/rivenbot/RivenBotApplication.java similarity index 96% rename from src/main/java/com/deahtstroke/rivenbot/Destiny2botApplication.java rename to src/main/java/com/deahtstroke/rivenbot/RivenBotApplication.java index 9b0be5b..e109243 100644 --- a/src/main/java/com/deahtstroke/rivenbot/Destiny2botApplication.java +++ b/src/main/java/com/deahtstroke/rivenbot/RivenBotApplication.java @@ -23,10 +23,10 @@ @EnableCaching @SpringBootApplication @EnableAspectJAutoProxy -public class Destiny2botApplication { +public class RivenBotApplication { public static void main(String[] args) { - SpringApplication.run(Destiny2botApplication.class, args); + SpringApplication.run(RivenBotApplication.class, args); } @Bean diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index 7f88ae1..d122e00 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -1,3 +1,10 @@ +spring: + data: + redis: + host: localhost + mongodb: + host: localhost + application: callback: # Replace with your own callback url masking port 8080 to run locally diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 089f638..699c883 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -1,3 +1,10 @@ +spring: + data: + redis: + host: redis + mongodb: + host: mongo + application: callback: - url: https://d2discord.app \ No newline at end of file + url: https://rivenbot.app \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 53cca29..c32a588 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,13 +2,11 @@ spring: data: redis: port: 6379 - host: ${REDIS_HOST} mongodb: username: ${MONGO_DB_ROOT_USERNAME} password: ${MONGO_DB_ROOT_PASSWORD} authentication-database: admin database: riven_of_a_thousand_servers - host: ${MONGO_DB_HOST} port: 27017 bungie: