feat: deploy specific commit for apps

feat: keep number of images locally to revert quickly
This commit is contained in:
Andras Bacsai
2022-11-29 11:47:20 +01:00
parent ec00548f1b
commit 028ee6d7b1
9 changed files with 117 additions and 23 deletions

View File

@@ -53,7 +53,8 @@ export async function listAllSettings(request: FastifyRequest) {
}
export async function saveSettings(request: FastifyRequest<SaveSettings>, reply: FastifyReply) {
try {
const {
let {
numberOfDockerImagesKeptLocally,
doNotTrack,
fqdn,
isAPIDebuggingEnabled,
@@ -67,9 +68,12 @@ export async function saveSettings(request: FastifyRequest<SaveSettings>, reply:
proxyDefaultRedirect
} = request.body
const { id } = await listSettings();
if (numberOfDockerImagesKeptLocally) {
numberOfDockerImagesKeptLocally = Number(numberOfDockerImagesKeptLocally)
}
await prisma.setting.update({
where: { id },
data: { doNotTrack, isRegistrationEnabled, dualCerts, isAutoUpdateEnabled, isDNSCheckEnabled, DNSServers, isAPIDebuggingEnabled, }
data: { numberOfDockerImagesKeptLocally, doNotTrack, isRegistrationEnabled, dualCerts, isAutoUpdateEnabled, isDNSCheckEnabled, DNSServers, isAPIDebuggingEnabled, }
});
if (fqdn) {
await prisma.setting.update({ where: { id }, data: { fqdn } });

View File

@@ -2,6 +2,7 @@ import { OnlyId } from "../../../../types"
export interface SaveSettings {
Body: {
numberOfDockerImagesKeptLocally: number,
doNotTrack: boolean,
fqdn: string,
isAPIDebuggingEnabled: boolean,