Skip to content

Commit

Permalink
updated docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Troisi committed Dec 3, 2024
1 parent 3aaeece commit 77b0cc2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker-image-en-tag-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- name: Log Voice Token
run: |
echo "Voice token log: ${{ secrets.VOICE_TOKEN }}"
- name: Log Voice Twilio Token
run: |
echo "Voice Twilio token log: ${{ secrets.VOICE_TWILIO_TOKEN }}"
- name: Generate Docker metadata
id: meta
Expand All @@ -43,4 +47,5 @@ jobs:
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
VOICE_TOKEN=${{ secrets.VOICE_TOKEN }}
VOICE_TWILIO_TOKEN=${{ secrets.VOICE_TWILIO_TOKEN }}
tags: ${{ steps.meta.outputs.tags }}
1 change: 1 addition & 0 deletions Dockerfile-en
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY .npmrc_ .npmrc

# Set environment variable based on build argument
ENV VOICE_TOKEN=${VOICE_TOKEN}
ENV VOICE_TWILIO_TOKEN=${VOICE_TWILIO_TOKEN}

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
Expand Down
26 changes: 14 additions & 12 deletions pubmodules/pubModulesManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,20 +371,22 @@ class PubModulesManager {
}
}

try {
this.voiceTwilio = require('./voice-twilio');
winston.info("this.voiceTwilio: " + this.voiceTwilio);
this.voiceTwilio.listener.listen(config);
if (process.env.VOICE_TWILIO_TOKEN === process.env.VOICE_TWILIO_SECRET) {
try {
this.voiceTwilio = require('./voice-twilio');
winston.info("this.voiceTwilio: " + this.voiceTwilio);
this.voiceTwilio.listener.listen(config);

this.voiceTwilioRoute = this.voiceTwilio.voiceTwilioRoute;
this.voiceTwilioRoute = this.voiceTwilio.voiceTwilioRoute;

winston.info("PubModulesManager initialized apps (voiceTwilio).")
} catch(err) {
console.log("\n Unable to start voiceTwilio connector: ", err);
if (err.code == 'MODULE_NOT_FOUND') {
winston.info("PubModulesManager init apps module not found ");
} else {
winston.info("PubModulesManager error initializing init apps module", err);
winston.info("PubModulesManager initialized apps (voiceTwilio).")
} catch(err) {
console.log("\n Unable to start voiceTwilio connector: ", err);
if (err.code == 'MODULE_NOT_FOUND') {
winston.info("PubModulesManager init apps module not found ");
} else {
winston.info("PubModulesManager error initializing init apps module", err);
}
}
}

Expand Down

0 comments on commit 77b0cc2

Please sign in to comment.