mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-11 07:10:56 +03:00
Compare commits
6 Commits
bug-fixes
...
docker-ubu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab5cd409bb | ||
|
|
e0509e8091 | ||
|
|
0c1568b38d | ||
|
|
f8a0d14968 | ||
|
|
f5894e6bc0 | ||
|
|
f205f8e58e |
10
Dockerfile
10
Dockerfile
@@ -2,8 +2,9 @@ FROM ubuntu:22.04 AS ffmpeg
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
COPY docker-build.sh .
|
RUN apt-get update && apt-get install -y software-properties-common
|
||||||
RUN sh ./docker-build.sh
|
RUN add-apt-repository ppa:savoury1/ffmpeg4
|
||||||
|
RUN add-apt-repository ppa:savoury1/ffmpeg5 && apt-get update && apt-get install -y ffmpeg
|
||||||
|
|
||||||
#--------------# Stage 2
|
#--------------# Stage 2
|
||||||
|
|
||||||
@@ -48,7 +49,8 @@ RUN apt-get update && apt-get -y install \
|
|||||||
python2 \
|
python2 \
|
||||||
python3 \
|
python3 \
|
||||||
gosu \
|
gosu \
|
||||||
atomicparsley && \
|
atomicparsley \
|
||||||
|
--no-install-recommends && \
|
||||||
apt-get install -f && \
|
apt-get install -f && \
|
||||||
apt-get autoremove --purge && \
|
apt-get autoremove --purge && \
|
||||||
apt-get autoremove && \
|
apt-get autoremove && \
|
||||||
@@ -71,5 +73,5 @@ COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/
|
|||||||
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
||||||
|
|
||||||
EXPOSE 17442
|
EXPOSE 17442
|
||||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
# ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||||
CMD [ "pm2-runtime", "pm2.config.js" ]
|
CMD [ "pm2-runtime", "pm2.config.js" ]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build --configuration production",
|
"build": "ng build --configuration production",
|
||||||
"prebuild": "node src/postbuild.mjs",
|
"prebuild": "node src/postbuild.js",
|
||||||
"heroku-postbuild": "npm install --prefix backend",
|
"heroku-postbuild": "npm install --prefix backend",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
|
|||||||
43
src/postbuild.js
Normal file
43
src/postbuild.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
const fs = require('fs-extra');
|
||||||
|
const path = require('path');
|
||||||
|
const xliffToJSON = require('xliff-to-json');
|
||||||
|
|
||||||
|
async function recFindByExt(base,ext,files,result)
|
||||||
|
{
|
||||||
|
files = files || (await fs.readdir(base))
|
||||||
|
result = result || []
|
||||||
|
|
||||||
|
for (const file of files) {
|
||||||
|
var newbase = path.join(base,file)
|
||||||
|
if ( (await fs.stat(newbase)).isDirectory() )
|
||||||
|
{
|
||||||
|
result = await recFindByExt(newbase,ext,await fs.readdir(newbase),result)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( file.substr(-1*(ext.length+1)) == '.' + ext )
|
||||||
|
{
|
||||||
|
result.push(newbase)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
// outputs array of supported locales
|
||||||
|
async function createLocalizationJSON() {
|
||||||
|
xliffToJSON.convert('src/assets/i18n');
|
||||||
|
const files = await recFindByExt(path.join('src', 'assets', 'i18n'), 'json');
|
||||||
|
const locales = [];
|
||||||
|
|
||||||
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
const file = path.basename(files[i]);
|
||||||
|
const file_parts = file.split('.');
|
||||||
|
locales.push(file_parts[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.unlinkSync('src/assets/i18n/messages.en.json');
|
||||||
|
fs.writeJSONSync('src/assets/i18n/supported_locales.json', {supported_locales: locales});
|
||||||
|
}
|
||||||
|
|
||||||
|
createLocalizationJSON();
|
||||||
Reference in New Issue
Block a user