Skip to content

Commit

Permalink
Merge branch 'prod' into altv1
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush-maherwal authored Nov 27, 2024
2 parents 162c826 + 317b8dc commit 669f7b5
Show file tree
Hide file tree
Showing 7 changed files with 826 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/backend-gla-prod-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#It is deploying on server 15.206.144.84 For Dev Environment only please note.
name: Deploy to DEV
on:
push:
branches:
- prod
jobs:
build:
name: Generate Build and Deploy to DEV
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node Env
uses: actions/setup-node@v3
with:
node-version: 21.1.0

- name: Deploy to Server 1
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY_ALT_GLA_PROD }}
REMOTE_HOST: ${{ secrets.HOST_DNS_ALT_GLA_PROD }}
REMOTE_USER: ${{ secrets.USERNAME_ALT_GLA_PROD }}


- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_SSH_KEY_ALT_GLA_PROD }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# Add the SSH key to the known_hosts file (replace hostname with your actual hostname)
ssh-keyscan -H ${{ secrets.HOST_DNS_ALT_GLA_PROD }} >> ~/.ssh/known_hosts
sudo apt-get install sshpass
- name: Deploy to server
run: |
sshpass -p '${{ secrets.EC2_SSH_KEY_ALT_GLA_PROD }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USERNAME_ALT_GLA_PROD }}@${{ secrets.HOST_DNS_ALT_GLA_PROD }} <<'ENDSSH'
cd /home/prasad/alt-gla-prod-backend #It is deploying on server 13.203.108.107 For Dev Environment only please note.
./deploy.sh
ENDSSH


3 changes: 2 additions & 1 deletion src/adapters/diksha/dikshaCourse.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const DikshaCourseToken = "DikshaCourse";
@Injectable()
export class DikshaCourseService implements IServicelocator {
constructor(private httpService: HttpService) {}
currentUrl = process.env.SUNBIRDURL;
currentUrl = process.env.DIKSHAURL;
public async getAllCourse(
channel: [string],
subject: [string],
Expand Down Expand Up @@ -153,6 +153,7 @@ export class DikshaCourseService implements IServicelocator {

public async getCourseHierarchy(value: any, type: any) {
console.log("value", value)
console.log("url", this.currentUrl)
var axios = require("axios");
if (type == "assessment") {
let config = {
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/hasura/adapter.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function getToken() {
});
const config = {
method: "post",
url: "https://alt.uniteframework.io/auth/realms/master/protocol/openid-connect/token",
url: "https://alt-palooza.uniteframework.io/auth/realms/master/protocol/openid-connect/token",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
Expand Down
Loading

0 comments on commit 669f7b5

Please sign in to comment.