diff --git a/.gitignore b/.gitignore index a2d9bd1..dec23e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ **/db.sqlite **/node_modules +**/appdata .github .git \ No newline at end of file diff --git a/appdata/.gitkeep b/appdata/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/controllers/apps.js b/controllers/apps.js index 0d412c7..efaec1f 100644 --- a/controllers/apps.js +++ b/controllers/apps.js @@ -61,6 +61,8 @@ export const Apps = async (req, res) => { last_page = Math.ceil(compose_files.length/28); compose_files.forEach(file => { + if (file == '.gitignore') { return; } + let compose = readFileSync(`templates/compose/${file}/compose.yaml`, 'utf8'); let compose_data = parse(compose); let service_name = Object.keys(compose_data.services) @@ -541,6 +543,7 @@ export const Upload = (req, res) => { let files = readdirSync('templates/tmp/'); for (let i = 0; i < files.length; i++) { + if (files[i].endsWith('.zip')) { let zip = new AdmZip(`templates/tmp/${files[i]}`); zip.extractAllTo('templates/compose', true); diff --git a/templates/compose/.gitignore b/templates/compose/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/templates/compose/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/templates/compose/.gitkeep b/templates/compose/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/templates/tmp/.gitignore b/templates/tmp/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/templates/tmp/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/templates/tmp/.gitkeep b/templates/tmp/.gitkeep deleted file mode 100644 index e69de29..0000000