Skip to content

Commit

Permalink
Docker compose fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RainyXeon committed Feb 13, 2024
1 parent 5477e9d commit a6b73a3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
- lavalink
- mongodb
environment:
- DOCKER_COMPOSE_DATABASE=true
- DOCKER_COMPOSE_MODE=true
# Database
- MONGO_URI=mongodb://byteblaze:cylane@mongodb:27017/streamhatchet?directConnection=true&authSource=admin&replicaSet=replicaset&retryWrites=true
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<metadata>
<bot>
<version>5.0.1</version>
<version>5.0.2</version>
<autofix>5.0.1</autofix>
<kazagumo>3.0.1</kazagumo>
<codename>vocaloid_kaito</codename>
Expand Down
12 changes: 7 additions & 5 deletions src/services/ConfigDataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ export class ConfigDataService {
// Change lavalink data
const lavalink_changedata = res.lavalink.NODES[0];
lavalink_changedata.url = String(process.env.NODE_URL);
lavalink_changedata.name = String(process.env.NODE_URL);
lavalink_changedata.name = "node_1";
lavalink_changedata.auth = String(process.env.NODE_AUTH);
lavalink_changedata.secure = false;

// Change db data
const db_chnagedata = res.features.DATABASE;
if (db_chnagedata.driver == "mongodb") {
db_chnagedata.config.uri = String(process.env.MONGO_URI);
if (process.env.DOCKER_COMPOSE_DATABASE) {
// Change db data
const db_chnagedata = res.features.DATABASE;
if (db_chnagedata.driver == "mongodb") {
db_chnagedata.config.uri = String(process.env.MONGO_URI);
}
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/shard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
process.env.IS_SHARING = "true";

const manager = new ClusterManager(join(__dirname, "index.js"), {
totalShards: 7, // or 'auto'
/// Check below for more options
shardsPerClusters: 2,
// totalClusters: 7,
mode: "process", // you can also choose "worker"
totalShards: "auto",
shardsPerClusters: 3,
totalClusters: "auto",
mode: "worker",
token: new ConfigDataService().data.bot.TOKEN,
});

Expand Down

0 comments on commit a6b73a3

Please sign in to comment.