[**@s4ai/core Documentation v0.3.23**](../../../README.md)

***

[@s4ai/core Documentation](../../../modules.md) / [infrastructure/railway-deployer](../README.md) / RailwayDeployer

# Class: RailwayDeployer

Defined in: infrastructure/railway-deployer.js:11

## Constructors

### Constructor

> **new RailwayDeployer**(`config?`): `RailwayDeployer`

Defined in: infrastructure/railway-deployer.js:12

#### Parameters

##### config?

#### Returns

`RailwayDeployer`

## Properties

### apiToken

> **apiToken**: `any`

Defined in: infrastructure/railway-deployer.js:13

***

### baseUrl

> **baseUrl**: `string`

Defined in: infrastructure/railway-deployer.js:16

***

### deployments

> **deployments**: `any`[]

Defined in: infrastructure/railway-deployer.js:17

***

### environmentId

> **environmentId**: `any`

Defined in: infrastructure/railway-deployer.js:15

***

### projectId

> **projectId**: `any`

Defined in: infrastructure/railway-deployer.js:14

## Methods

### createPlugin()

> **createPlugin**(`pluginConfig`): `Promise`\<\{ `error`: `any`; `message?`: `undefined`; `plugin?`: `undefined`; `success`: `boolean`; \} \| \{ `error?`: `undefined`; `message`: `string`; `plugin`: `any`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:265

Create plugin (add-on service)

#### Parameters

##### pluginConfig

`any`

#### Returns

`Promise`\<\{ `error`: `any`; `message?`: `undefined`; `plugin?`: `undefined`; `success`: `boolean`; \} \| \{ `error?`: `undefined`; `message`: `string`; `plugin`: `any`; `success`: `boolean`; \}\>

***

### deployDatabase()

> **deployDatabase**(`dbConfig`): `Promise`\<\{ `database?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `database`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:136

Deploy PostgreSQL database

#### Parameters

##### dbConfig

`any`

#### Returns

`Promise`\<\{ `database?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `database`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>

***

### deployService()

> **deployService**(`serviceConfig`): `Promise`\<\{ `error`: `any`; `message?`: `undefined`; `service?`: `undefined`; `success`: `boolean`; \} \| \{ `error?`: `undefined`; `message`: `string`; `service`: `any`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:23

Deploy service from GitHub

#### Parameters

##### serviceConfig

`any`

#### Returns

`Promise`\<\{ `error`: `any`; `message?`: `undefined`; `service?`: `undefined`; `success`: `boolean`; \} \| \{ `error?`: `undefined`; `message`: `string`; `service`: `any`; `success`: `boolean`; \}\>

***

### getDeploymentLogs()

> **getDeploymentLogs**(`deploymentId`): `Promise`\<\{ `error?`: `undefined`; `logs`: `any`; `status`: `any`; `success`: `boolean`; \} \| \{ `error`: `any`; `logs?`: `undefined`; `status?`: `undefined`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:190

Get deployment logs

#### Parameters

##### deploymentId

`any`

#### Returns

`Promise`\<\{ `error?`: `undefined`; `logs`: `any`; `status`: `any`; `success`: `boolean`; \} \| \{ `error`: `any`; `logs?`: `undefined`; `status?`: `undefined`; `success`: `boolean`; \}\>

***

### getStatus()

> **getStatus**(): `object`

Defined in: infrastructure/railway-deployer.js:365

#### Returns

`object`

##### apiToken

> **apiToken**: `string`

##### capabilities

> **capabilities**: `string`[]

##### configured

> **configured**: `boolean`

##### environmentId

> **environmentId**: `any`

##### projectId

> **projectId**: `any`

***

### listProjects()

> **listProjects**(): `Promise`\<\{ `error`: `any`; `projects?`: `undefined`; `success`: `boolean`; `total?`: `undefined`; \} \| \{ `error?`: `undefined`; `projects`: `any`; `success`: `boolean`; `total`: `any`; \}\>

Defined in: infrastructure/railway-deployer.js:321

List all projects

#### Returns

`Promise`\<\{ `error`: `any`; `projects?`: `undefined`; `success`: `boolean`; `total?`: `undefined`; \} \| \{ `error?`: `undefined`; `projects`: `any`; `success`: `boolean`; `total`: `any`; \}\>

***

### redeploy()

> **redeploy**(`serviceId`): `Promise`\<\{ `deployment?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `deployment`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:220

Trigger redeployment

#### Parameters

##### serviceId

`any`

#### Returns

`Promise`\<\{ `deployment?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `deployment`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>

***

### setEnvironmentVariables()

> **setEnvironmentVariables**(`variables`): `Promise`\<\{ `count?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `count`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>

Defined in: infrastructure/railway-deployer.js:87

Set environment variables for service

#### Parameters

##### variables

`any`

#### Returns

`Promise`\<\{ `count?`: `undefined`; `error`: `any`; `message?`: `undefined`; `success`: `boolean`; \} \| \{ `count`: `any`; `error?`: `undefined`; `message`: `string`; `success`: `boolean`; \}\>
