Skip to content

Commit

Permalink
Merge pull request #143 from holashchand/build-fix
Browse files Browse the repository at this point in the history
[BUG]: Fixed docker build failures
  • Loading branch information
Pratikshakhandagale authored Oct 16, 2023
2 parents 43417db + e84e83f commit 42c62a3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ COPY . /app
ARG configuration=production
RUN npm run build -- --outputPath=./dist/out
# Stage 2, use the compiled app, ready for production with Nginx
FROM dockerhub/sunbird-rc-nginx
FROM ghcr.io/sunbird-rc/sunbird-rc-nginx
COPY --from=build /app/dist/out/ /usr/share/nginx/html/admin
COPY /deps/nginx.conf /etc/nginx/conf.d/default.conf
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
RELEASE_VERSION = v0.0.7-beta
IMAGE_NAME=ghcr.io/sunbird-rc/sunbird-rc-admin-portal
build:
docker build -t dockerhub/sunbird-rc-admin-portal .
docker build -t $(IMAGE_NAME) .

release: build
docker tag dockerhub/sunbird-rc-admin-portal dockerhub/sunbird-rc-admin-portal:$(RELEASE_VERSION)
docker push dockerhub/sunbird-rc-admin-portal:latest
docker push dockerhub/sunbird-rc-admin-portal:$(RELEASE_VERSION)
docker tag $(IMAGE_NAME) $(IMAGE_NAME):$(RELEASE_VERSION)
docker push $(IMAGE_NAME):latest
docker push $(IMAGE_NAME):$(RELEASE_VERSION)
4 changes: 2 additions & 2 deletions src/app/admin/config-workflow/config-workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ export class ConfigWorkflowComponent implements OnInit {
s = s.replace(/\[(\w+)\]/g, '.$1');
s = s.replace(/^\./, '');
var a = s.split('.');
for (var i = 0, n = a.length; i < n; ++i) {
for (let i = 0, n = a.length; i < n; ++i) {
var k = a[i];
if (k in o) {
o = o[k];
Expand Down Expand Up @@ -662,7 +662,7 @@ export class ConfigWorkflowComponent implements OnInit {
}
else {
this.checks = false;
for (var i = this.modalSelectedAttributes.length - 1; i >= 0; i--) {
for (let i = this.modalSelectedAttributes.length - 1; i >= 0; i--) {
if (this.modalSelectedAttributes[i] === val) {
this.modalSelectedAttributes.splice(i, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/ownership/ownership.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class OwnershipComponent implements OnInit, OnChanges {
let requiredProperties = this.useCaseSchema[i]["schema"]["definitions"][this.entityName]["required"];
if (this.useCaseSchema[i]["schema"]["definitions"][this.entityName]?.properties) {
var nestedFields = this.useCaseSchema[i]["schema"]["definitions"][this.entityName].properties;
for (var c in nestedFields) {
for (let c in nestedFields) {
if (nestedFields.hasOwnProperty(c)) {
if (nestedFields[c].required) {
for (let k = 0; k < nestedFields[c].required.length; k++) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/documents/add-document/add-document.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class AddDocumentComponent implements OnInit {
if (this.steps_length == this.step) {
this.schemaloaded = false;
this.schema_property = JSON.parse(this.doc_data['additionalInput'])
for (var [key, value] of Object.entries(this.schema_property)) {
for (let [key, value] of Object.entries(this.schema_property)) {
console.log(key, value);
if (value["value"]) {
var datavalue = this.getValue(value["value"], this.doc_data);
Expand Down
12 changes: 6 additions & 6 deletions src/app/forms/forms.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,15 +697,15 @@ exLength : number = 0
this.generalService.getPrefillData(apiurl).subscribe((res) => {
if (field.autofill.fields) {
field.autofill.fields.forEach(element => {
for (var [key1, value1] of Object.entries(element)) {
for (let [key1, value1] of Object.entries(element)) {
this.createPath(this.model, key1, this.ObjectbyString(res, value1))
this.form2.get(key1).setValue(this.ObjectbyString(res, value1))
}
});
}
if (field.autofill.dropdowns) {
field.autofill.dropdowns.forEach(element => {
for (var [key1, value1] of Object.entries(element)) {
for (let [key1, value1] of Object.entries(element)) {
if (Array.isArray(res)) {
res = res[0]
}
Expand All @@ -726,15 +726,15 @@ exLength : number = 0
if (field.autofill.fields) {
field.autofill.fields.forEach(element => {

for (var [key1, value1] of Object.entries(element)) {
for (let [key1, value1] of Object.entries(element)) {
this.createPath(this.model, key1, this.ObjectbyString(res, value1))
this.form2.get(key1).setValue(this.ObjectbyString(res, value1))
}
});
}
if (field.autofill.dropdowns) {
field.autofill.dropdowns.forEach(element => {
for (var [key1, value1] of Object.entries(element)) {
for (let [key1, value1] of Object.entries(element)) {
this.schema["properties"][key1]['items']['enum'] = this.ObjectbyString(res, value1)
}
});
Expand Down Expand Up @@ -1232,7 +1232,7 @@ let entity = this.entityName.charAt(0).toUpperCase() + this.entityName.slice(1);
s = s.replace(/\[(\w+)\]/g, '.$1');
s = s.replace(/^\./, '');
var a = s.split('.');
for (var i = 0, n = a.length; i < n; ++i) {
for (let i = 0, n = a.length; i < n; ++i) {
var k = a[i];
if (k in o) {
o = o[k];
Expand Down Expand Up @@ -1262,7 +1262,7 @@ let entity = this.entityName.charAt(0).toUpperCase() + this.entityName.slice(1);
if (typeof obj !== 'object') {
return false;
}
for (var key in obj) {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
var t = path;
var v = obj[key];
Expand Down
4 changes: 2 additions & 2 deletions src/app/layouts/layouts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class LayoutsComponent implements OnInit, OnChanges {

if (block.fields.includes && block.fields.includes.length > 0) {
if (block.fields.includes == "*") {
for (var element in this.model) {
for (let element in this.model) {
if (!Array.isArray(this.model[element])) {
if (typeof this.model[element] == 'string') {
temp_object = this.responseData['definitions'][block.definition]['properties'][element]
Expand Down Expand Up @@ -386,7 +386,7 @@ export class LayoutsComponent implements OnInit, OnChanges {

pushData(data) {
var object = {};
for (var key in data) {
for (let key in data) {
if (data.hasOwnProperty(key))
object[key] = data[key];
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/tables/tables.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class TablesComponent implements OnInit {

pushData(data) {
var object = {};
for (var key in data) {
for (let key in data) {
if (data.hasOwnProperty(key))
object[key] = data[key];
}
Expand Down

0 comments on commit 42c62a3

Please sign in to comment.