Files
coolify/src/models/Configuration.ts
Andras Bacsai b4c836afbd v1.0.23 (#68)
# Features 
- Build environment variables for NodeJS builds
- Initial monorepo support (more tests needed!)

# Fixes
- Fix wrong redirects
- Logout fix for the session manager
2021-07-16 23:42:14 +02:00

60 lines
1.5 KiB
TypeScript

import mongoose from 'mongoose';
const { Schema } = mongoose;
const ConfigurationSchema = new Schema({
github: {
installation: {
id: { type: Number, required: true }
},
app: {
id: { type: Number, required: true }
}
},
repository: {
id: { type: Number, required: true },
organization: { type: String, required: true },
name: { type: String, required: true },
branch: { type: String, required: true }
},
general: {
deployId: { type: String, required: true },
nickname: { type: String, required: true },
workdir: { type: String, required: true },
isPreviewDeploymentEnabled: { type: Boolean, required: true, default: false },
pullRequest: { type: Number, required: true, default: 0 }
},
build: {
pack: { type: String, required: true },
directory: { type: String },
command: {
build: { type: String },
installation: { type: String },
start: { type: String },
python: {
module: { type: String },
instance: { type: String }
}
},
container: {
name: { type: String, required: true },
tag: { type: String, required: true },
baseSHA: { type: String, required: true }
}
},
publish: {
directory: { type: String },
domain: { type: String, required: true },
path: { type: String },
port: { type: Number },
secrets: [{
name: { type: String },
value: { type: String },
isBuild: { type: Boolean, default: false },
}]
}
});
ConfigurationSchema.set('timestamps', true);
export default mongoose.models['configuration'] ||
mongoose.model('configuration', ConfigurationSchema);