Browse Source

Improve self deployment

Remove_explore
George Kalampokis 2 years ago
parent
commit
d67e68d0d9
  1. 1
      dmp-backend/Docker/dmp-backend.env
  2. 34
      dmp-backend/Dockerfile
  3. 5
      dmp-backend/web/src/main/resources/config/application-devel.properties
  4. 6
      dmp-backend/web/src/main/resources/config/application.properties
  5. 4
      dmp-backend/web/src/main/resources/logging/logback-production.xml
  6. 4
      dmp-backend/web/src/main/resources/logging/logback-staging.xml
  7. 49
      dmp-frontend/Dockerfile
  8. 48
      dmp-frontend/mime.types
  9. 35
      dmp-frontend/nginx.conf
  10. 2
      dmp-frontend/src/app/core/model/dmp/dmp.ts
  11. 2
      dmp-frontend/src/app/core/model/funder/funder.ts
  12. 2
      dmp-frontend/src/app/core/model/grant/grant-listing.ts
  13. 2
      dmp-frontend/src/app/core/model/organisation/organization.ts
  14. 2
      dmp-frontend/src/app/core/model/project/project.ts
  15. 2
      dmp-frontend/src/app/core/services/auth/auth.service.ts
  16. 8
      dmp-frontend/src/app/core/services/lock/lock.service.ts
  17. 4
      dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts
  18. 92
      dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts
  19. 2
      dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts
  20. 2
      dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts
  21. 2
      dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts
  22. 2
      dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts
  23. 2
      dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts
  24. 4
      dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
  25. 2
      dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts
  26. 4
      dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts
  27. 2
      dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts
  28. 2
      dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts
  29. 2
      dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts
  30. 2
      dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts
  31. 6
      dmp-frontend/src/app/ui/sidebar/sidebar.component.ts
  32. 2
      dmp-frontend/src/assets/config/config.json
  33. 241
      docker-compose.yml
  34. 0
      openDMP/dmp-backend/opendmp-logs/.gitkeep
  35. 0
      openDMP/dmp-backend/tmp/.gitkeep
  36. 0
      openDMP/dmp-frontend/static-files/.gitkeep
  37. 0
      openDMP/dmp-frontend/webapp/.gitkeep
  38. 0
      user-guide/UserGuideDRAFT.html

1
dmp-backend/Docker/dmp-backend.env

@ -0,0 +1 @@
PROFILE=staging

34
dmp-backend/Dockerfile

@ -1,11 +1,23 @@
FROM openjdk:8-jdk-alpine
RUN apk add --update \
curl \
&& rm -rf /var/cache/apk/*
VOLUME /tmp
ARG PROFILE=production
ENV PROF $PROFILE
ADD web/src/main/resources/ProjectConfiguration.xml /tmp/ProjectConfiguration.xml
ADD web/src/main/resources/ExternalUrls.xml /tmp/ExternalUrls.xml
ADD web/target/web-1.0-SNAPSHOT.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom" ,"-Dspring.profiles.active=${PROF}","-jar","/app.jar"]
FROM maven:3-jdk-8-alpine AS MAVEN_BUILD
COPY pom.xml /build/
COPY data /build/data/
COPY elastic /build/elastic/
COPY logging /build/logging/
COPY queryable /build/queryable/
COPY web /build/web/
WORKDIR /build/
RUN mvn package
FROM openjdk:8-jre-alpine
WORKDIR /app
COPY --from=MAVEN_BUILD /build/web/target/web-1.0-SNAPSHOT.jar /app/app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom" ,"-Dspring.profiles.active=${PROFILE}","-jar","/app/app.jar"]

5
dmp-backend/web/src/main/resources/config/application-devel.properties

@ -77,4 +77,7 @@ zenodo.login.redirect_uri=http://localhost:4200/login/external/zenodo
#############CONTACT EMAIL CONFIGURATIONS#########
contact_email.mail=
language.path=tempLang/i18n/
language.path=i18n/
#############LOGGING#########
logging.config=classpath:logging/logback-${spring.profiles.active}.xml

6
dmp-backend/web/src/main/resources/config/application.properties

@ -1,4 +1,4 @@
server.port=8080
server.port=8081
server.tomcat.max-threads = 20
server.tomcat.max-connections = 10000
logging.file=/logs/spring-boot-logging.log
@ -79,7 +79,7 @@ database.lock-fail-interval=120000
##########################MISC##########################################
#############USER GUIDE#########
userguide.path=guide/
userguide.path=user-guide/
#############NOTIFICATION#########
notification.rateInterval=30000
@ -90,7 +90,7 @@ notification.finalised.subject=[OpenDMP] The {name} has been finalised
notification.modifiedFinalised.subject=[OpenDMP] The {name} has been modified and finalised
#############LOGGING#########
logging.config=classpath:logging/logback-${spring.profiles.active}.xml
logging.config=file:/app/logging/logback-${spring.profiles.active}.xml
#############TEMP#########
temp.temp=tmp/

4
dmp-backend/web/src/main/resources/logging/logback-production.xml

@ -7,9 +7,9 @@
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/files/logs/openDMP.log</file>
<file>/app/logs/openDMP.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/files/logs/openDMP-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<fileNamePattern>/app/logs/openDMP-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>

4
dmp-backend/web/src/main/resources/logging/logback-staging.xml

@ -7,9 +7,9 @@
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/files/logs/openDMP.log</file>
<file>/app/logs/openDMP.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/files/logs/openDMP-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<fileNamePattern>/app/logs/openDMP-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>

49
dmp-frontend/Dockerfile

@ -1,17 +1,32 @@
FROM johnpapa/angular-cli as angular
WORKDIR /app
COPY package.json /app/
RUN npm cache clear --force && npm install
COPY ./ /app/
ARG env=dev
ARG aot=--no-aot
RUN echo $env
RUN echo $aot
RUN if [ "$env" = "prod" ]; then ng build --$env --$aot; else ng build --$aot; fi
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.13
COPY --from=angular /app/dist/ /usr/share/nginx/html
COPY --from=angular /app/static/ /usr/share/nginx/static
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
# stage1 as builder
FROM node:12-alpine as builder
WORKDIR /page
# copy the package.json to install dependencies
COPY package.json /page
# Install the dependencies and make the folder
RUN npm install
COPY . /page
# Build the project and copy the files
RUN npm run ng build -- --deploy-url=/ --prod
FROM nginx:alpine
#!/bin/sh
COPY nginx.conf /etc/nginx
COPY mime.types /etc/nginx
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
# Copy from the stahg 1
COPY --from=builder /page/dist /usr/share/nginx/html
EXPOSE 4200
ENTRYPOINT ["nginx", "-g", "daemon off;", "-p", "/usr/share/nginx"]

48
dmp-frontend/mime.types

@ -0,0 +1,48 @@
types {
text/html html htm shtml;
text/css css;
text/xml xml rss;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
text/plain txt;
text/x-component htc;
text/mathml mml;
image/png png;
image/x-icon ico;
image/x-jng jng;
image/vnd.wap.wbmp wbmp;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/pdf pdf;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/zip zip;
application/octet-stream deb;
application/octet-stream bin exe dll;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
audio/mpeg mp3;
audio/x-realaudio ra;
video/mpeg mpeg mpg;
video/quicktime mov;
video/x-flv flv;
video/x-msvideo avi;
video/x-ms-wmv wmv;
video/x-ms-asf asx asf;
video/x-mng mng;
}

35
dmp-frontend/nginx.conf

@ -0,0 +1,35 @@
events {
worker_connections 4096; ## Default: 1024
}
http {
include ./mime.types;
server {
listen 4200;
sendfile on;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 1100;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
}
}

2
dmp-frontend/src/app/core/model/dmp/dmp.ts

@ -1,4 +1,4 @@
import { Status } from "../../common/enum/Status";
import { Status } from "../../common/enum/status";
import { DmpProfile, DmpProfileDefinition } from "../dmp-profile/dmp-profile";
import { OrganizationModel } from "../organisation/organization";
import { GrantListingModel } from "../grant/grant-listing";

2
dmp-frontend/src/app/core/model/funder/funder.ts

@ -1,4 +1,4 @@
import { Status } from "../../common/enum/Status";
import { Status } from "../../common/enum/status";
export class FunderModel {
id: string;

2
dmp-frontend/src/app/core/model/grant/grant-listing.ts

@ -1,6 +1,6 @@
import { UrlListingItem } from "../../../library/url-listing/url-listing-item";
import { GrantType } from '../../common/enum/grant-type';
import { Status } from '../../common/enum/Status';
import { Status } from '../../common/enum/status';
export interface GrantListingModel {
id?: string;

2
dmp-frontend/src/app/core/model/organisation/organization.ts

@ -1,4 +1,4 @@
import { Status } from "../../common/enum/Status";
import { Status } from "../../common/enum/status";
export interface OrganizationModel {
id: string;

2
dmp-frontend/src/app/core/model/project/project.ts

@ -1,4 +1,4 @@
import { Status } from "../../common/enum/Status";
import { Status } from "../../common/enum/status";
import { UrlListingItem } from "../../../library/url-listing/url-listing-item";
import { ProjectType } from "../../common/enum/project-type";

2
dmp-frontend/src/app/core/services/auth/auth.service.ts

@ -5,7 +5,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { Credential } from '@app/core/model/auth/credential';
import { LoginInfo } from '@app/core/model/auth/login-info';
import { Principal } from '@app/core/model/auth/Principal';
import { Principal } from '@app/core/model/auth/principal';
import { ConfigurableProvider } from '@app/core/model/configurable-provider/configurableProvider';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { BaseService } from '@common/base/base.service';

8
dmp-frontend/src/app/core/services/lock/lock.service.ts

@ -17,18 +17,18 @@ export class LockService {
}
checkLockStatus(id: string): Observable<boolean> {
return this.http.get(`${this.actionUrl}target/status/${id}`, {headers: this.headers});
return this.http.get(`${this.actionUrl}target/status/${id}`, { headers: this.headers });
}
unlockTarget(id: string): Observable<any> {
return this.http.delete(`${this.actionUrl}target/unlock/${id}`, {headers: this.headers});
return this.http.delete(`${this.actionUrl}target/unlock/${id}`, { headers: this.headers });
}
getSingle(id: string): Observable<LockModel> {
return this.http.get(`${this.actionUrl}target/${id}`, {headers: this.headers});
return this.http.get(`${this.actionUrl}target/${id}`, { headers: this.headers });
}
createOrUpdate(lock: LockModel): Observable<string> {
return this.http.post(`${this.actionUrl}`, lock, {headers: this.headers});
return this.http.post(`${this.actionUrl}`, lock, { headers: this.headers });
}
}

4
dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material';
import { Router } from '@angular/router';
import { RecentActivityType } from '@app/core/common/enum/recent-activity-type';
import { Principal } from '@app/core/model/auth/Principal';
import { Principal } from '@app/core/model/auth/principal';
import { DataTableRequest } from '@app/core/model/data-table/data-table-request';
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
@ -10,7 +10,7 @@ import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { BaseComponent } from '@common/base/base.component';
import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver';

92
dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts

@ -34,7 +34,7 @@ import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver';
import { Observable, of as observableOf, interval } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { Principal } from "@app/core/model/auth/Principal";
import { Principal } from "@app/core/model/auth/principal";
import { Role } from "@app/core/common/enum/role";
import { LockService } from '@app/core/services/lock/lock.service';
import { Location } from '@angular/common';
@ -109,7 +109,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
// displayFn: (item) => item['label'],
// titleFn: (item) => item['label']
// };
switch(tabToNav) {
switch (tabToNav) {
case 'general':
this.selectedTab = 0;
break;
@ -130,52 +130,52 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
.subscribe(async data => {
this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
this.lockStatus = lockStatus;
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.setIsUserOwner();
if (!this.isUserOwner) {
this.isFinalized = true;
this.formGroup.disable();
}
this.dmp = new DmpEditorModel();
this.dmp.grant = new GrantTabModel();
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.fromModel(data);
this.formGroup = this.dmp.buildForm();
this.setIsUserOwner();
if (!this.isUserOwner) {
this.isFinalized = true;
this.formGroup.disable();
}
//this.registerFormEventsForDmpProfile(this.dmp.definition);
if (!this.editMode || this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
if (this.isAuthenticated) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
//this.registerFormEventsForDmpProfile(this.dmp.definition);
if (!this.editMode || this.dmp.status === DmpStatus.Finalized || lockStatus) {
this.isFinalized = true;
this.formGroup.disable();
}
// if (!this.isAuthenticated) {
const breadCrumbs = [];
breadCrumbs.push({
parentComponentName: null,
label: this.language.instant('NAV-BAR.MY-DMPS'),
url: "/plans"
});
breadCrumbs.push({
parentComponentName: 'DmpListingComponent',
label: this.dmp.label,
url: '/plans/edit/' + this.dmp.id,
// notFoundResolver: [await this.grantService.getSingle(this.dmp.grant.id).map(x => ({ label: x.label, url: '/grants/edit/' + x.id }) as BreadcrumbItem).toPromise()]
if (this.isAuthenticated) {
if (!lockStatus) {
this.lock = new LockModel(data.id, this.getUserFromDMP());
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
this.lock.id = Guid.parse(result);
interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
});
}
// if (!this.isAuthenticated) {
const breadCrumbs = [];
breadCrumbs.push({
parentComponentName: null,
label: this.language.instant('NAV-BAR.MY-DMPS'),
url: "/plans"
});
breadCrumbs.push({
parentComponentName: 'DmpListingComponent',
label: this.dmp.label,
url: '/plans/edit/' + this.dmp.id,
// notFoundResolver: [await this.grantService.getSingle(this.dmp.grant.id).map(x => ({ label: x.label, url: '/grants/edit/' + x.id }) as BreadcrumbItem).toPromise()]
}
);
this.breadCrumbs = observableOf(breadCrumbs);
}
);
this.breadCrumbs = observableOf(breadCrumbs);
}
this.associatedUsers = data.associatedUsers;
this.people = data.users;
})
this.associatedUsers = data.associatedUsers;
this.people = data.users;
})
});
} else if (publicId != null) {
this.isNew = false;
@ -567,7 +567,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
private pumpLock() {
this.lock.touchedAt = new Date();
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe( async result => this.lock.id = Guid.parse(result));
this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => this.lock.id = Guid.parse(result));
}
// advancedClicked() {

2
dmp-frontend/src/app/ui/dmp/editor/grant-tab/funder-form-model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { FunderModel } from '@app/core/model/funder/funder';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';

2
dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab-model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { GrantListingModel } from '@app/core/model/grant/grant-listing';
import { ValidJsonValidator } from '@app/library/auto-complete/auto-complete-custom-validator';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';

2
dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { ProjectModel } from '@app/core/model/project/project';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';

2
dmp-frontend/src/app/ui/dmp/editor/people-tab/people-tab.component.ts

@ -3,7 +3,7 @@ import { FormGroup } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core';
import { Principal } from '../../../../core/model/auth/Principal';
import { Principal } from '../../../../core/model/auth/principal';
import { UserInfoListingModel } from '../../../../core/model/user/user-info-listing';
import { AuthService } from '../../../../core/services/auth/auth.service';
import { DmpService } from '../../../../core/services/dmp/dmp.service';

2
dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.ts

@ -5,7 +5,7 @@ import { DmpInvitationDialogComponent } from '../../invitation/dmp-invitation.co
import { Router, ActivatedRoute } from '@angular/router';
import { DatasetService } from '../../../../core/services/dataset/dataset.service';
import { AuthService } from '../../../../core/services/auth/auth.service';
import { Principal } from '../../../../core/model/auth/Principal';
import { Principal } from '../../../../core/model/auth/principal';
import { TranslateService } from '@ngx-translate/core';
import { DmpStatus } from '../../../../core/common/enum/dmp-status';

4
dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts

@ -4,7 +4,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { DatasetStatus } from '@app/core/common/enum/dataset-status';
import { DmpStatus } from '@app/core/common/enum/dmp-status';
import { Principal } from '@app/core/model/auth/Principal';
import { Principal } from '@app/core/model/auth/principal';
import { DatasetOverviewModel } from '@app/core/model/dataset/dataset-overview';
import { DatasetsToBeFinalized } from '@app/core/model/dataset/datasets-toBeFinalized';
import { DmpOverviewModel } from '@app/core/model/dmp/dmp-overview';
@ -357,7 +357,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
maxWidth: '600px',
restoreFocus: false,
data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI', { 'username': this.hasDOIToken ? this.authentication.current().zenodoEmail : 'default'}),
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI', { 'username': this.hasDOIToken ? this.authentication.current().zenodoEmail : 'default' }),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
}

2
dmp-frontend/src/app/ui/dmp/wizard/dmp-wizard-editor.model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { DmpProfile, DmpProfileDefinition } from '@app/core/model/dmp-profile/dmp-profile';
import { DmpModel } from '@app/core/model/dmp/dmp';
import { DmpDynamicField } from '@app/core/model/dmp/dmp-dynamic-field';

4
dmp-frontend/src/app/ui/explore-dmp/listing-item/explore-dmp-listing-item.component.ts

@ -1,6 +1,6 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { DmpListingModel } from '../../../core/model/dmp/dmp-listing';
import { Principal } from '../../../core/model/auth/Principal';
import { Principal } from '../../../core/model/auth/principal';
import { AuthService } from '../../../core/services/auth/auth.service';
import { TranslateService } from '@ngx-translate/core';
import { Router, ActivatedRoute } from '@angular/router';
@ -21,7 +21,7 @@ export class ExploreDmpListingItemComponent implements OnInit {
private translate: TranslateService,
private router: Router,
private route: ActivatedRoute
) { }
) { }
ngOnInit() {
}

2
dmp-frontend/src/app/ui/grant/editor/grant-editor.model.ts

@ -3,7 +3,7 @@ import { BackendErrorValidator } from '@common/forms/validation/custom-validator
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
import { ValidationContext } from '@common/forms/validation/validation-context';
import { GrantType } from '../../../core/common/enum/grant-type';
import { Status } from '../../../core/common/enum/Status';
import { Status } from '../../../core/common/enum/status';
import { ContentFile, GrantListingModel } from '../../../core/model/grant/grant-listing';
export class GrantEditorModel {

2
dmp-frontend/src/app/ui/misc/navigation/user-dialog/user-dialog.component.ts

@ -2,7 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { Principal } from '../../../../core/model/auth/Principal';
import { Principal } from '../../../../core/model/auth/principal';
import { AuthService } from '../../../../core/services/auth/auth.service';
@Component({

2
dmp-frontend/src/app/ui/quick-wizard/dmp-editor/dmp-editor-wizard-model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile';
import { DmpProfileDefinition } from '@app/core/model/dmp-profile/dmp-profile';
import { DmpModel } from '@app/core/model/dmp/dmp';

2
dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard-model.ts

@ -1,5 +1,5 @@
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
import { Status } from '@app/core/common/enum/Status';
import { Status } from '@app/core/common/enum/status';
import { GrantListingModel } from '@app/core/model/grant/grant-listing';
import { ValidJsonValidator } from '@app/library/auto-complete/auto-complete-custom-validator';
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';

6
dmp-frontend/src/app/ui/sidebar/sidebar.component.ts

@ -3,7 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { AuthService } from '../../core/services/auth/auth.service';
import { UserDialogComponent } from '../misc/navigation/user-dialog/user-dialog.component';
import { Principal } from '../../core/model/auth/Principal';
import { Principal } from '../../core/model/auth/principal';
import { AppRole } from '../../core/common/enum/app-role';
import { Router } from '@angular/router';
import { Location } from '@angular/common';
@ -51,8 +51,8 @@ export const ADMIN_ROUTES: RouteInfo[] = [
{ path: '/dmp-profiles', title: 'SIDE-BAR.DMP-TEMPLATES', icon: 'library_books' },
{ path: '/dataset-profiles', title: 'SIDE-BAR.DATASET-TEMPLATES', icon: 'library_books' },
{ path: '/users', title: 'SIDE-BAR.USERS', icon: 'people' },
{ path: '/language-editor', title: 'SIDE-BAR.LANGUAGE-EDITOR', icon: 'language'},
{ path: '/user-guide-editor', title: 'SIDE-BAR.GUIDE-EDITOR', icon: 'import_contacts'}
{ path: '/language-editor', title: 'SIDE-BAR.LANGUAGE-EDITOR', icon: 'language' },
{ path: '/user-guide-editor', title: 'SIDE-BAR.GUIDE-EDITOR', icon: 'import_contacts' }
];
// export const HISTORY_ROUTES: RouteInfo[] = [
// { path: '/typography', title: 'SIDE-BAR.HISTORY-VISITED', icon: 'visibility'},

2
dmp-frontend/src/assets/config/config.json

@ -1,6 +1,6 @@
{
"production": false,
"Server": "http://localhost:8080/api/",
"Server": "http://localhost:8081/api/",
"App": "http://localhost:4200/",
"HelpService": {
"Enabled": false,

241
docker-compose.yml

@ -1,212 +1,41 @@
---
version: '3'
services:
# The environment variable "TAG" is used throughout this file to
# specify the version of the images to run. The default is set in the
# '.env' file in this folder. It can be overridden with any normal
# technique for setting environment variables, for example:
#
# TAG=6.0.0-beta1 docker-compose up
#
# REF: https://docs.docker.com/compose/compose-file/#variable-substitution
#
# Also be sure to set the ELASTIC_VERSION variable. For released versions,
# ${TAG} and ${ELASTIC_VERSION} will be identical, but for pre-release
# versions, ${TAG} might contain an extra build identifier, like
# "6.0.0-beta1-3eab5b40", so a full invocation might look like:
#
# ELASTIC_VERSION=6.0.0-beta1 TAG=6.0.0-beta1-3eab5b40 docker-compose up
#
##########################DMP######################################################################
version: '2.2'
services:
dmp-backend:
build:
context: ./dmp-backend
args:
PROFILE: ${PROFILE}
container_name: dmp-backend
ports: ['0.0.0.0:8080:8080']
links:
# - logstash:logstash
- elasticsearch-dmp:elasticsearch-dmp
networks: ['stack','elasticsearch-dmp']
build:
context: ./dmp-backend
container_name: opendmp-backend
env_file: ./dmp-backend/Docker/dmp-backend.env
restart: unless-stopped
mem_limit: 2048m
ports:
- "8081:8081"
networks:
- opendmp-backend-network
volumes:
- ./openDMP/dmp-backend/config:/app/config
- ./openDMP/dmp-backend/user-guide:/app/user-guide
- ./openDMP/dmp-backend/i18n:/app/i18n
- ./openDMP/dmp-backend/externalUrls:/app/externalUrls
- ./openDMP/dmp-backend/templates:/app/templates
- ./openDMP/dmp-backend/opendmp-logs:/app/logs
- ./openDMP/dmp-backend/tmp:/app/tmp
- ./openDMP/dmp-backend/logging:/app/logging
dmp-frontend:
build:
context: ./dmp-frontend
args:
env: ${ENV}
aot: ${AOT}
container_name: dmp-frontend
volumes:
- ./static:/usr/share/nginx/static
- /srv/docker/wwwcert:/usr/share/nginx/wwwcert
ports: ['0.0.0.0:80:80']
networks: ['stack']
##########################ELASTIC######################################################################
elasticsearch-dmp:
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
container_name: elasticsearch-dmp
volumes:
- ./elastic-config/elasticsearch-custom.yml:/usr/share/elasticsearch/config/elasticsearch.yml
environment: ['http.host=0.0.0.0','transport.host=0.0.0.0','discovery.type=single-node']
ports: ['0.0.0.0:9201:9200','0.0.0.0:9301:9300']
networks: ['elasticsearch-dmp']
volumes:
- esdata-dmp:/usr/share/elasticsearch/data
##########################ELK-STACK######################################################################
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
container_name: elasticsearch
environment: ['http.host=0.0.0.0', 'transport.host=127.0.0.1', 'ELASTIC_PASSWORD=${ELASTIC_PASSWORD}','discovery.type=single-node']
ports: ['0.0.0.0:9200:9200']
networks: ['stack']
volumes:
- esdata:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:${TAG}
container_name: kibana
ports: ['0.0.0.0:5601:5601']
networks: ['stack']
depends_on: ['elasticsearch']
logstash:
image: docker.elastic.co/logstash/logstash:${TAG}
container_name: logstash
context: ./dmp-frontend
container_name: opendmp-frontend
mem_limit: 2048m
restart: unless-stopped
ports:
- "8080:4200"
volumes:
- ./ELK.Docker/config/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
ports: ['0.0.0.0:31311:31311']
networks: ['stack']
depends_on: ['elasticsearch', 'setup_logstash']
#filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: filebeat
# command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_filebeat']
#heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: heartbeat
# command: -e -E 'output.elasticsearch.password=${ELASTIC_PASSWORD}'
# networks: ['stack']
# depends_on: ['elasticsearch', 'setup_heartbeat']
# Run a short-lived container to set up Logstash.
setup_logstash:
image: centos:7
container_name: setup_logstash
volumes: ['./ELK.Docker/scripts/setup-logstash.sh:/usr/local/bin/setup-logstash.sh:ro']
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-logstash.sh | tr -d "\r" | bash']
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
networks: ['stack']
depends_on: ['elasticsearch']
setup_kibana:
image: centos:7
container_name: setup_kibana
volumes: ['./ELK.Docker/scripts/setup-kibana.sh:/usr/local/bin/setup-kibana.sh:ro']
command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-kibana.sh | tr -d "\r" | bash']
environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
networks: ['stack']
depends_on: ['elasticsearch']
#setup_filebeat:
# image: docker.elastic.co/beats/filebeat:${TAG}
# container_name: setup_filebeat
# volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s filebeat']
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
# networks: ['stack']
# depends_on: ['kibana']
#setup_heartbeat:
# image: docker.elastic.co/beats/heartbeat:${TAG}
# container_name: setup_heartbeat
# volumes: ['./ELK.Docker/scripts/setup-beat.sh:/usr/local/bin/setup-beat.sh:ro']
# command: ['/bin/bash', '-c', 'cat /usr/local/bin/setup-beat.sh | tr -d "\r" | bash -s heartbeat']
# environment: ['ELASTIC_PASSWORD=${ELASTIC_PASSWORD}']
# networks: ['stack']
# depends_on: ['kibana']
##########################DOCSBOX######################################################################
# web:
# restart: always
# build: ./docsbox-master/docsbox
# expose:
# - "8000"
# links:
# - redis:redis
# volumes:
# - docsbox:/home/docsbox
# - media:/home/docsbox/media
# command: gunicorn -b :8000 docsbox:app
# networks: ['stack']
# rqworker:
# restart: always
# build: ./docsbox-master/docsbox
# links:
# - redis:redis
# volumes:
# - web
# command: rq worker -c docsbox.settings
# networks: ['stack']
# rqscheduler:
# restart: always
# build: ./docsbox-master/docsbox
# links:
# - redis:redis
# volumes:
# - web
# command: rqscheduler -H redis -p 6379 -d 0
# networks: ['stack']
# nginx:
# restart: always
# build: ./docsbox-master/nginx/
# ports:
# - "81:80"
# volumes:
# - web
# links:
# - web:web
# networks: ['stack']
# redis:
# restart: always
# image: redis:latest
# expose:
# - "6379"
# volumes:
# - redisdata:/data
# networks: ['stack']
##########################SETTINGS######################################################################
volumes:
esdata:
driver: local
esdata-dmp:
driver: local
#redisdata:
# driver: local
# docsbox:
# driver: local
# media:
# driver: local
networks:
stack: {}
elasticsearch-dmp: {}
- ./openDMP/dmp-frontend/static-files:/usr/share/nginx/static
- ./openDMP/dmp-frontend/webapp/config:/usr/share/nginx/html/assets/config
networks:
- opendmp-frontend-network
networks:
opendmp-frontend-network:
opendmp-backend-network:

0
openDMP/dmp-backend/opendmp-logs/.gitkeep

0
openDMP/dmp-backend/tmp/.gitkeep

0
openDMP/dmp-frontend/static-files/.gitkeep

0
openDMP/dmp-frontend/webapp/.gitkeep

0
guide/UserGuideDRAFT.html → user-guide/UserGuideDRAFT.html

Loading…
Cancel
Save