Skip to content

Commit

Permalink
chore: adding configs to notif worker:
Browse files Browse the repository at this point in the history
  • Loading branch information
shawakash committed Apr 7, 2024
1 parent 4d0a55c commit 90730d5
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/backend-notif-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
printf "AUTH_JWT_PUBLIC_KEY=%s\n" "${{secrets.AUTH_JWT_PUBLIC_KEY}}" >> .env
printf "AUTH_JWT_PRIVATE_KEY=%s\n" "${{secrets.AUTH_JWT_PRIVATE_KEY}}" >> .env
printf "PROCESS=%s\n" "${{secrets.PROCESS}}" >> .env
printf "TWILLO_ACCOUNT_SID=%s\n" "$TWILLO_ACCOUNT_SID" >> .env
printf "TWILLO_TOKEN=%s\n" "$TWILLO_TOKEN" >> .env
printf "TWILLO_NUMBER=%s\n" "$TWILLO_NUMBER" >> .env
printf "REDIS_SECRET=%s\n" "$REDIS_SECRET" >> .env
printf "GMAIL_APP_PASS=%s\n" "$GMAIL_APP_PASS" >> .env
printf "GMAIL=%s\n" "$GMAIL" >> .env
printf "MAIL_SERVICE=%s\n" "$MAIL_SERVICE" >> .env
cd ../..
- name: docker login
Expand Down
9 changes: 8 additions & 1 deletion backend/notif-worker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ HAURA_ADMIN_SECRET=
AUTH_JWT=
AUTH_JWT_PUBLIC_KEY=
AUTH_JWT_PRIVATE_KEY=
PROCESS=
PROCESS=
TWILLO_ACCOUNT_SID=
TWILLO_TOKEN=
TWILLO_NUMBER=
REDIS_SECRET=
GMAIL_APP_PASS=
GMAIL=
MAIL_SERVICE=gmail
15 changes: 15 additions & 0 deletions backend/notif-worker/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,18 @@ export const AUTH_JWT_PUBLIC_KEY =
export const AUTH_JWT_PRIVATE_KEY =
process.env.AUTH_JWT_PRIV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8JG9lupe/p3r6gRvB13nWiwVzj2wgK2SY0HGG1gaRaIS3K2nVEQKBgQCNhlJ6V9as9+GIHkYKZ0R0u/ovgU0MtAgKmye0T4jGOSvsd58hRAyrSf8g38tFMFSS+fOEfVjhTLLnY35KFtOGDVthf4QiEfuD0HKT3k3W0rws/D61iID2QZdAtV5b3N9VSM/eDWhsYboSo+gWvYTivMdlvcD3gbvisKNJkWD31QKBgCdgIqSPCHUJBK6K7WevyKPl7+xt8RNLbI1rzGvSeoEpzxnmZ8ZoQXomnVOplJwuIaqnPpEVqAfmIFSTGZcppJQH4XIfg7HTHW67G5SP4ucoJPZJr1N+MvZ4lJgLd/90V0CL2HVN+8gK/SvwazThO/GqVZQ3tPvrgEHM8vJIAQHRAoGAEjFMNmitScLogo9Cq5oX88/KpDOfCi+IG19g0HdaepgzreDzallcKf/XnXX9d7wuTuoSRNsq7RfCmLAUlzC+Waw0dpwLkZjgeVvFdrADGOFDKEovesZ0NBQ+Ln0SXJVRaynRxgnrjYINE+1I3uE8XZie4NMh5pybTXBpyx/cIz0=-----END PRIVATE KEY-----";


export const TWILLO_ACCOUNT_SID = process.env.TWILLO_ACCOUNT_SID || "";

export const TWILLO_TOKEN = process.env.TWILLO_TOKEN || "";

export const TWILLO_NUMBER = process.env.TWILLO_NUMBER || "";

export const REDIS_SECRET = process.env.REDIS_SECRET || "04eec09f";

export const GMAIL = process.env.GMAIL || "";

export const GMAIL_APP_PASS = process.env.GMAIL_APP_PASS || "";

export const MAIL_SERVICE = process.env.MAIL_SERVICE || "gmail";
14 changes: 14 additions & 0 deletions docker/notif-worker/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ env:
AUTH_JWT_PUBLIC_KEY: "AUTH_JWT_PUBLIC_KEY"
AUTH_JWT_PRIVATE_KEY: "AUTH_JWT_PRIVATE_KEY"
PROCESS: "PROCESS"
TWILLO_ACCOUNT_SID: "TWILLO_ACCOUNT_SID"
TWILLO_TOKEN: "TWILLO_TOKEN"
TWILLO_NUMBER: "TWILLO_NUMBER"
REDIS_SECRET: "REDIS_SECRET"
GMAIL_APP_PASS: "GMAIL_APP_PASS"
GMAIL: "GMAIL"
MAIL_SERVICE: "MAIL_SERVICE"

phases:
install:
Expand All @@ -35,6 +42,13 @@ phases:
- printf "AUTH_JWT_PUBLIC_KEY=%s\n" "$AUTH_JWT_PUBLIC_KEY" >> .env
- printf "AUTH_JWT_PRIVATE_KEY=%s\n" "$AUTH_JWT_PRIVATE_KEY" >> .env
- printf "PROCESS=%s\n" "$PROCESS" >> .env
- printf "TWILLO_ACCOUNT_SID=%s\n" "$TWILLO_ACCOUNT_SID" >> .env
- printf "TWILLO_TOKEN=%s\n" "$TWILLO_TOKEN" >> .env
- printf "TWILLO_NUMBER=%s\n" "$TWILLO_NUMBER" >> .env
- printf "REDIS_SECRET=%s\n" "$REDIS_SECRET" >> .env
- printf "GMAIL_APP_PASS=%s\n" "$GMAIL_APP_PASS" >> .env
- printf "GMAIL=%s\n" "$GMAIL" >> .env
- printf "MAIL_SERVICE=%s\n" "$MAIL_SERVICE" >> .env
- cd ../..
artifacts:
files:
Expand Down

0 comments on commit 90730d5

Please sign in to comment.