Skip to content

Commit

Permalink
doc: updated documentation (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon <[email protected]>
  • Loading branch information
sleidig and TheSlimvReal authored Dec 11, 2023
1 parent fa9cbef commit 1067589
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Deployer Backend

This server allows to automatically deploy applications on the server.

The API works in combination with the [ndb-setup](https://github.com/Aam-Digital/ndb-setup) scripts, for instructions to integrate this API deployment service, see https://github.com/Aam-Digital/ndb-setup/tree/master/deployer

8 changes: 4 additions & 4 deletions integrations/elementor-plugin/form-actions/aam-deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function register_settings_section( $widget ) {
[
'label' => esc_html__( 'Client name', 'elementor-forms-aam-deploy' ),
'type' => \Elementor\Controls_Manager::TEXT,
'description' => esc_html__( 'Enter you client name.', 'elementor-forms-aam-deploy' ),
'description' => esc_html__( 'Enter your client name.', 'elementor-forms-aam-deploy' ),
]
);

Expand All @@ -149,7 +149,7 @@ public function register_settings_section( $widget ) {
[
'label' => esc_html__( 'Client key', 'elementor-forms-aam-deploy' ),
'type' => \Elementor\Controls_Manager::TEXT,
'description' => esc_html__( 'Enter you secret client key.', 'elementor-forms-aam-deploy' ),
'description' => esc_html__( 'Enter your secret client key (API token).', 'elementor-forms-aam-deploy' ),
]
);

Expand All @@ -158,7 +158,7 @@ public function register_settings_section( $widget ) {
[
'label' => esc_html__( 'Language', 'elementor-forms-aam-deploy' ),
'type' => \Elementor\Controls_Manager::TEXT,
'description' => esc_html__( 'Enter the default language for the deployed app ("en", "de",...).', 'elementor-forms-aam-deploy' ),
'description' => esc_html__( 'Enter the default language for the deployed app ("en", "de", ...).', 'elementor-forms-aam-deploy' ),
'default' => 'en'
]
);
Expand Down Expand Up @@ -209,4 +209,4 @@ public function on_export( $element ) {

return $element;
}
}
}
1 change: 1 addition & 0 deletions src/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('AppController', () => {

it('should throw bad request exception if data has wrong format', (done) => {
const invalidData = { ...deploymentData, name: 'with space' };
// TODO: add an extensive list of invalid formats including attempts someone could pass to try and inject code?

controller.deployApp(invalidData).subscribe({
error: (err) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const lowSeverityLevels: SeverityLevel[] = ['log', 'info'];
dsn: configService.get('SENTRY_DSN'),
debug: true,
environment: 'prod',
release: 'backend@' + process.env.npm_package_version,
release: 'deployer-backend@' + process.env.npm_package_version,
whitelistUrls: [/https?:\/\/(.*)\.?aam-digital\.com/],
initialScope: {
tags: {
Expand Down
40 changes: 40 additions & 0 deletions src/deployment-info.dto.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
import { ApiProperty } from '@nestjs/swagger';

export class DeploymentInfo {
@ApiProperty({
description:
'Name of the system to be created. Must not contain whitespaces.',
})
name: string;

@ApiProperty({
description: 'Language for the system (and keycloak).',
})
locale?: string;

@ApiProperty({
description: 'Username of the initial user account created as site admin.',
})
username: string;

@ApiProperty({
description: 'Email for the initial user account.',
})
email: string;

@ApiProperty({
description:
'Whether the permission backend (replication-backend) should be set up.',
})
backend: boolean;

@ApiProperty({
description: 'Whether the new system should be added to uptime monitoring.',
})
monitor: boolean;

@ApiProperty({
description: 'Name of the Keycloak confidential client.',
})
client: string;

@ApiProperty({
description: 'Credentials for the Keycloak confidential client.',
})
clientKey: string;

@ApiProperty({
description:
'The prebuilt configuration which should be used as a basis for this app.',
})
base: string;
}

0 comments on commit 1067589

Please sign in to comment.