forked from inflection-zone/rean-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from REAN-Foundation/release/uat-0.2.4
Release/uat 0.2.4
- Loading branch information
Showing
954 changed files
with
67,336 additions
and
22,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Admin Portal Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop-inflection | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install AWS CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y awscli | ||
# - name: Install dependencies | ||
# run: | | ||
# pip install -r requirements.txt | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ap-south-1 | ||
|
||
- name: Login to Amazon ECR | ||
run: aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 443751504066.dkr.ecr.ap-south-1.amazonaws.com | ||
|
||
- name: Copy env file | ||
run: aws s3 cp s3://reancare-configs/rean-admin-portal/.env ./.env | ||
|
||
- name: Build Docker image | ||
run: | | ||
docker build -t 443751504066.dkr.ecr.ap-south-1.amazonaws.com/rean-admin-portal:${{ github.sha }} . | ||
docker push 443751504066.dkr.ecr.ap-south-1.amazonaws.com/rean-admin-portal:${{ github.sha }} | ||
- name: SSH into EC2 instance | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.EC2_HOST }} | ||
username: ${{ secrets.EC2_USERNAME }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
docker stop admin-portal || true | ||
docker rm admin-portal || true | ||
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 443751504066.dkr.ecr.ap-south-1.amazonaws.com | ||
docker pull 443751504066.dkr.ecr.ap-south-1.amazonaws.com/rean-admin-portal:${{ github.sha }} | ||
docker run -d -p 3000:3000 --network host --name admin-portal 443751504066.dkr.ecr.ap-south-1.amazonaws.com/rean-admin-portal:${{ github.sha }} | ||
# - name: Get the latest revision of ECS task definition | ||
# id: get-latest-revision | ||
# run: | | ||
# latest_revision=$(aws ecs describe-task-definition --task-definition document-processor --query 'taskDefinition.revision' --output text) | ||
# echo "Latest revision: $latest_revision" | ||
# echo "::set-output name=revision::$latest_revision" | ||
|
||
# - name: Download task definition | ||
# run: | | ||
# aws ecs describe-task-definition --task-definition document-processor:${{ steps.get-latest-revision.outputs.revision }} \ | ||
# --query taskDefinition > task-definition.json | ||
# cat task-definition.json | ||
|
||
# - name: Update container image in task definition | ||
# run: | | ||
# jq '.containerDefinitions[0].image="443751504066.dkr.ecr.ap-south-1.amazonaws.com/document-processor:${{ github.sha }}"' task-definition.json > new-task-definition.json | ||
# jq 'del(.taskDefinitionArn, .revision, .status, .registeredAt, .registeredBy, .requiresAttributes, .compatibilities)' new-task-definition.json > modified-task-definition.json | ||
# mv modified-task-definition.json new-task-definition.json | ||
# cat new-task-definition.json | ||
|
||
# - name: Create a new revision of ECS task definition | ||
# id: create-new-revision | ||
# run: | | ||
# new_revision=$(aws ecs register-task-definition --cli-input-json file://new-task-definition.json --query 'taskDefinition.revision' --output text) | ||
# echo "New revision created: $new_revision" | ||
# echo "::set-output name=new-revision::$new_revision" | ||
|
||
# - name: Deploy to ECS | ||
# run: | | ||
# aws ecs update-service --cluster reancare-cluster --service document-processor --task-definition document-processor:${{ steps.create-new-revision.outputs.new-revision }} --force-new-deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
"useTabs": false, | ||
"tabWidth": 4, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"endOfLine": "lf", | ||
"bracketSpacing": true, | ||
"printWidth": 120, | ||
"singleAttributePerLine": true, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"pluginSearchDirs": ["."], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch server", | ||
"request": "launch", | ||
"runtimeArgs": ["run-script", "dev"], | ||
"runtimeExecutable": "npm", | ||
"skipFiles": ["<node_internals>/**"], | ||
"type": "node", | ||
"console": "integratedTerminal" | ||
}, | ||
|
||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Edge", | ||
"url": "http://localhost:5173", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Both", | ||
"configurations": ["Launch server", "Launch Edge"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { defineConfig } from "cypress"; | ||
|
||
export default defineConfig({ | ||
|
||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
|
||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.