chore: bump version to 2.2.0

This commit is contained in:
Nicolas Meienberger 2023-11-15 22:07:30 +01:00 committed by Nicolas Meienberger
parent 9efacb5797
commit 2dcb358392
6 changed files with 14 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "runtipi",
"version": "2.1.0",
"version": "2.2.0",
"description": "A homeserver for everyone",
"scripts": {
"knip": "knip",

View file

@ -157,6 +157,8 @@ export const generateSystemEnvFile = async () => {
envMap.set('REDIS_HOST', 'tipi-redis');
envMap.set('REDIS_PASSWORD', redisPassword);
envMap.set('NODE_ENV', 'production');
envMap.set('DOMAIN', data.domain || 'example.com');
envMap.set('LOCAL_DOMAIN', data.localDomain || 'tipi.lan');
await fs.promises.writeFile(envFilePath, envMapToString(envMap));

View file

@ -11,7 +11,6 @@ export const envSchema = z.object({
NODE_ENV: z.union([z.literal('development'), z.literal('production'), z.literal('test')]),
REDIS_HOST: z.string(),
redisPassword: z.string(),
status: z.union([z.literal('RUNNING'), z.literal('UPDATING'), z.literal('RESTARTING')]),
architecture: z.nativeEnum(ARCHITECTURES),
dnsIp: z.string().ip().trim(),
rootFolder: z.string(),

View file

@ -83,7 +83,8 @@ const main = async () => {
startWorker();
});
} catch (e) {
console.log('YO', e);
logger.error(e);
process.exit(1);
}
};

View file

@ -200,7 +200,15 @@ export class AppExecutors {
this.logger.info(`Regenerating app.env file for app ${appId}`);
await this.ensureAppDir(appId);
await generateEnvFile(appId, config);
await compose(appId, 'down --remove-orphans --volumes --rmi all');
try {
await compose(appId, 'down --remove-orphans --volumes --rmi all');
} catch (err) {
if (err instanceof Error && err.message.includes('conflict')) {
this.logger.warn(`Could not fully uninstall app ${appId}. Some images are in use by other apps. Consider cleaning unused images docker system prune -a`);
} else {
throw err;
}
}
this.logger.info(`Deleting folder ${appDirPath}`);
await fs.promises.rm(appDirPath, { recursive: true, force: true }).catch((err) => {

View file

@ -39,7 +39,6 @@ export class TipiConfig {
domain: conf.DOMAIN,
localDomain: conf.LOCAL_DOMAIN,
dnsIp: conf.DNS_IP || '9.9.9.9',
status: 'RUNNING',
storagePath: conf.STORAGE_PATH,
demoMode: conf.DEMO_MODE,
guestDashboard: conf.GUEST_DASHBOARD,