Skip to content

Commit

Permalink
Merge pull request #12 from petercort/update-2
Browse files Browse the repository at this point in the history
Update 2
  • Loading branch information
petercort authored Nov 13, 2024
2 parents ac9b2bb + bcfb7dc commit 3d8ef72
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog


### Version 0.0.5

#### feature
* PR [#12](https://github.com/petercort/FBF-Event-Buddy/pull/12) - Update 2



### Version 0.0.4

#### bugfix
Expand Down
30 changes: 15 additions & 15 deletions config/event-buddy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ spec:
app: event-buddy
spec:
containers:
- image: ghcr.io/petercort/event-buddy:0.0.4
name: event-buddy
ports:
- containerPort: 80
volumeMounts:
- name: azure-secrets-store
mountPath: "/mnt/secrets-store"
readOnly: true
volumes:
- name: azure-secrets-store
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: "sc-demo-keyvault-csi"
- image: ghcr.io/petercort/event-buddy:0.0.5
name: event-buddy
ports:
- containerPort: 80
volumeMounts:
- name: azure-secrets-store
mountPath: "/mnt/secrets-store"
readOnly: true
volumes:
- name: azure-secrets-store
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: "sc-demo-keyvault-csi"
9 changes: 7 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ require('dotenv').config()
const { EventsTable } = require('./dbObjects.js');
const { exec } = require('node:child_process');
const { execute } = require('./commands/utility/create_event.js');
const { discordToken } = process.env;
const discordToken = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });


// in events table we have
// name, description, location, link, registration_url, event_guide, discipline, date, distances


try {
const discordToken2 = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8');
console.log(discordToken2);
} catch (err) {
console.error(err);
}

client.commands = new Collection();
const foldersPath = path.join(__dirname, 'commands');
Expand Down
2 changes: 1 addition & 1 deletion src/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fs = require('node:fs');
const path = require('node:path');
const discordToken = fs.readFileSync("/mnt/secrets-store/discordToken", 'utf8');
const guildId = fs.readFileSync("/mnt/secrets-store/guildId", 'utf8');
const appId = fs.readFileSync("/mnt/secrets-store/APPID", 'utf8');
const appId = fs.readFileSync("/mnt/secrets-store/appId", 'utf8');

const commands = [];
// Grab all the command folders from the commands directory you created earlier
Expand Down

0 comments on commit 3d8ef72

Please sign in to comment.