Skip to content

Commit

Permalink
✨🚀 feat(docker): update Gramps, Owncloud, Nextcloud, Lidarr, Notemark…
Browse files Browse the repository at this point in the history
…, and Zipline (#112)

This commit updates the versions and configurations of various self-hosted applications:

- Gramps: Updated from v24.7.0 to v24.8.0
- Owncloud: Updated from v10.14.0 to v10.15.0, and updated the `tipi_version` to 12
- Nextcloud Mini: Added a new `docker-compose.json` file to include the Nextcloud Mini app and its database
- Lidarr: Updated from v2.4.3 to v2.5.3, and added `created_at` and `updated_at` fields
- Notemark: Updated from v0.13.0 to v0.13.1, and updated the `tipi_version` to 13
- Zipline: Updated from v3.7.9 to v3.7.10, and updated the `tipi_version` to 11

The main reasons for these changes are to keep the applications up-to-date with the latest versions, which often include bug fixes, security updates, and new features. Additionally, the Nextcloud Mini app has been added to provide a more lightweight Nextcloud experience.
  • Loading branch information
dragonfire1119 authored Sep 16, 2024
1 parent 98d48e1 commit 228d192
Show file tree
Hide file tree
Showing 474 changed files with 4,118 additions and 1,562 deletions.
121 changes: 70 additions & 51 deletions apps/__tests__/apps.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from "fs";
import jsyaml from "js-yaml";
import fs from 'fs';
import jsyaml from 'js-yaml';

type FormField = {
type: "random";
type: 'random';
required: boolean;
};

Expand All @@ -24,25 +24,28 @@ interface AppConfig {
form_fields?: FormField[];
supported_architectures: string[];
dynamic_config: boolean;
created_at: number;
updated_at: number;
}

const networkExceptions = [
"matter-server",
"mdns-repeater",
"pihole",
"tailscale",
"homeassistant",
"plex",
"zerotier",
"gladys",
"scrypted",
"homebridge",
"cloudflared",
'matter-server',
'mdns-repeater',
'pihole',
'tailscale',
'homeassistant',
'plex',
'zerotier',
'gladys',
'scrypted',
'homebridge',
'cloudflared',
'beszel-agent',
];
const getAppConfigs = (): AppConfig[] => {
const apps: AppConfig[] = [];

const appsDir = fs.readdirSync("./apps");
const appsDir = fs.readdirSync('./apps');

appsDir.forEach((app: string) => {
const path = `./apps/${app}/config.json`;
Expand All @@ -56,22 +59,22 @@ const getAppConfigs = (): AppConfig[] => {
apps.push(config);
}
} catch (e) {
console.error("Error parsing config file", app);
console.error('Error parsing config file', app);
}
}
});

return apps;
};

describe("App configs", () => {
it("Get app config should return at least one app", () => {
describe('App configs', () => {
it('Get app config should return at least one app', () => {
const apps = getAppConfigs();

expect(apps.length).toBeGreaterThan(0);
});

describe("Each app should have an id", () => {
describe('Each app should have an id', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -81,7 +84,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a md description", () => {
describe('Each app should have a md description', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -98,7 +101,7 @@ describe("App configs", () => {
});
});

describe("Each app should have categories defined as an array", () => {
describe('Each app should have categories defined as an array', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -109,7 +112,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a name", () => {
describe('Each app should have a name', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -119,7 +122,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a description", () => {
describe('Each app should have a description', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -129,7 +132,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a port", () => {
describe('Each app should have a port', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -141,7 +144,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a supported architecture", () => {
describe('Each app should have a supported architecture', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -152,19 +155,19 @@ describe("App configs", () => {
});
});

test("Each app should have a different port", () => {
test('Each app should have a different port', () => {
const appConfigs = getAppConfigs();
const ports = appConfigs.map((app) => app.port);
expect(new Set(ports).size).toBe(appConfigs.length);
});

test("Each app should have a unique id", () => {
test('Each app should have a unique id', () => {
const appConfigs = getAppConfigs();
const ids = appConfigs.map((app) => app.id);
expect(new Set(ids).size).toBe(appConfigs.length);
});

describe("Each app should have a version", () => {
describe('Each app should have a version', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -176,7 +179,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a docker-compose file beside it", () => {
describe('Each app should have a docker-compose file beside it', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -186,7 +189,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a metadata folder beside it", () => {
describe('Each app should have a metadata folder beside it', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -196,7 +199,7 @@ describe("App configs", () => {
});
});

describe("Each app should have a file named logo.jpg in the metadata folder", () => {
describe('Each app should have a file named logo.jpg in the metadata folder', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
Expand All @@ -206,14 +209,12 @@ describe("App configs", () => {
});
});

describe("Each app should have a container name equals to its id", () => {
describe('Each app should have a container name equals to its id', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
test(app.id, () => {
const dockerComposeFile = fs
.readFileSync(`./apps/${app.id}/docker-compose.yml`)
.toString();
const dockerComposeFile = fs.readFileSync(`./apps/${app.id}/docker-compose.yml`).toString();

const dockerCompose: any = jsyaml.load(dockerComposeFile);

Expand All @@ -223,15 +224,13 @@ describe("App configs", () => {
});
});

describe("Each app should have the same version in config.json and docker-compose.yml", () => {
const exceptions = ["revolt"];
describe('Each app should have the same version in config.json and docker-compose.yml', () => {
const exceptions = ['revolt'];
const apps = getAppConfigs().filter((app) => !exceptions.includes(app.id));

apps.forEach((app) => {
test(app.id, () => {
const dockerComposeFile = fs
.readFileSync(`./apps/${app.id}/docker-compose.yml`)
.toString();
const dockerComposeFile = fs.readFileSync(`./apps/${app.id}/docker-compose.yml`).toString();

const dockerCompose: any = jsyaml.load(dockerComposeFile);

Expand All @@ -240,31 +239,27 @@ describe("App configs", () => {

const dockerImage = dockerCompose.services[app.id].image;

const version = dockerImage.split(":")[1];
const version = dockerImage.split(':')[1];

expect(version).toContain(app.version);
});
});
});

describe("Each app should have network tipi_main_network", () => {
describe('Each app should have network tipi_main_network', () => {
const apps = getAppConfigs();

apps.forEach((app) => {
test(app.id, () => {
if (!networkExceptions.includes(app.id)) {
const dockerComposeFile = fs
.readFileSync(`./apps/${app.id}/docker-compose.yml`)
.toString();
const dockerComposeFile = fs.readFileSync(`./apps/${app.id}/docker-compose.yml`).toString();

const dockerCompose: any = jsyaml.load(dockerComposeFile);

expect(dockerCompose.services[app.id]).toBeDefined();

expect(dockerCompose.services[app.id].networks).toBeDefined();
expect(dockerCompose.services[app.id].networks).toContain(
"tipi_main_network",
);
expect(dockerCompose.services[app.id].networks).toContain('tipi_main_network');
}
});
});
Expand All @@ -282,7 +277,7 @@ describe("App configs", () => {
const labelDoesNotExist = Object.keys(services).some((service) => {
const labels = services[service].labels || {};
if (labels) {
return !labels["runtipi.managed"];
return !labels['runtipi.managed'];
}
return true;
});
Expand All @@ -292,13 +287,13 @@ describe("App configs", () => {
});
});

describe("All form fields with type random should not be marked as required", () => {
describe('All form fields with type random should not be marked as required', () => {
const configs = getAppConfigs();
configs.forEach((config) => {
const formFields = config.form_fields;
if (formFields) {
formFields.forEach((field) => {
if (field.type === "random") {
if (field.type === 'random') {
test(config.id, () => {
expect(Boolean(field.required)).toBe(false);
});
Expand All @@ -307,4 +302,28 @@ describe("App configs", () => {
}
});
});

describe('All apps should have a createdAt field', () => {
const apps = getAppConfigs();
apps.forEach((app) => {
test(app.id, () => {
expect(app.created_at).toBeDefined();
expect(app.created_at).toBeGreaterThan(0);
expect(app.created_at).toBeLessThan(Date.now());
expect(new Date(app.created_at).getFullYear()).toBeGreaterThanOrEqual(2023);
});
});
});

describe('All apps should have an updatedAt field', () => {
const apps = getAppConfigs();
apps.forEach((app) => {
test(app.id, () => {
expect(app.updated_at).toBeDefined();
expect(app.updated_at).toBeGreaterThan(0);
expect(app.updated_at).toBeLessThan(Date.now());
expect(new Date(app.updated_at).getFullYear()).toBeGreaterThanOrEqual(2023);
});
});
});
});
9 changes: 6 additions & 3 deletions apps/activepieces/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"available": true,
"port": 8605,
"exposable": true,
"dynamic_config": true,
"id": "activepieces",
"description": "Your friendliest open source all-in-one automation tool.",
"tipi_version": 28,
"version": "0.29.1",
"tipi_version": 32,
"version": "0.32.0",
"categories": ["automation"],
"short_desc": "True zapier alternative.",
"author": "Activepieces",
Expand Down Expand Up @@ -38,5 +39,7 @@
"env_variable": "AP_JWT_SECRET"
}
],
"supported_architectures": ["arm64", "amd64"]
"supported_architectures": ["arm64", "amd64"],
"created_at": 1691943801422,
"updated_at": 1726366297000
}
Loading

0 comments on commit 228d192

Please sign in to comment.