Skip to content

Commit 1067589

Browse files
doc: updated documentation (#2)
Co-authored-by: Simon <[email protected]>
1 parent fa9cbef commit 1067589

File tree

5 files changed

+47
-6
lines changed

5 files changed

+47
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Deployer Backend
22

33
This server allows to automatically deploy applications on the server.
4-
4+
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
55

integrations/elementor-plugin/form-actions/aam-deploy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function register_settings_section( $widget ) {
140140
[
141141
'label' => esc_html__( 'Client name', 'elementor-forms-aam-deploy' ),
142142
'type' => \Elementor\Controls_Manager::TEXT,
143-
'description' => esc_html__( 'Enter you client name.', 'elementor-forms-aam-deploy' ),
143+
'description' => esc_html__( 'Enter your client name.', 'elementor-forms-aam-deploy' ),
144144
]
145145
);
146146

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

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

210210
return $element;
211211
}
212-
}
212+
}

src/app.controller.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ describe('AppController', () => {
5353

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

5758
controller.deployApp(invalidData).subscribe({
5859
error: (err) => {

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const lowSeverityLevels: SeverityLevel[] = ['log', 'info'];
4444
dsn: configService.get('SENTRY_DSN'),
4545
debug: true,
4646
environment: 'prod',
47-
release: 'backend@' + process.env.npm_package_version,
47+
release: 'deployer-backend@' + process.env.npm_package_version,
4848
whitelistUrls: [/https?:\/\/(.*)\.?aam-digital\.com/],
4949
initialScope: {
5050
tags: {

src/deployment-info.dto.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,51 @@
1+
import { ApiProperty } from '@nestjs/swagger';
2+
13
export class DeploymentInfo {
4+
@ApiProperty({
5+
description:
6+
'Name of the system to be created. Must not contain whitespaces.',
7+
})
28
name: string;
9+
10+
@ApiProperty({
11+
description: 'Language for the system (and keycloak).',
12+
})
313
locale?: string;
14+
15+
@ApiProperty({
16+
description: 'Username of the initial user account created as site admin.',
17+
})
418
username: string;
19+
20+
@ApiProperty({
21+
description: 'Email for the initial user account.',
22+
})
523
email: string;
24+
25+
@ApiProperty({
26+
description:
27+
'Whether the permission backend (replication-backend) should be set up.',
28+
})
629
backend: boolean;
30+
31+
@ApiProperty({
32+
description: 'Whether the new system should be added to uptime monitoring.',
33+
})
734
monitor: boolean;
35+
36+
@ApiProperty({
37+
description: 'Name of the Keycloak confidential client.',
38+
})
839
client: string;
40+
41+
@ApiProperty({
42+
description: 'Credentials for the Keycloak confidential client.',
43+
})
944
clientKey: string;
45+
46+
@ApiProperty({
47+
description:
48+
'The prebuilt configuration which should be used as a basis for this app.',
49+
})
1050
base: string;
1151
}

0 commit comments

Comments
 (0)