Skip to content

Commit

Permalink
Merge branch 'stage' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
moz-dfeller committed Nov 21, 2023
2 parents 665e1c8 + 0d56106 commit 4c8df3f
Show file tree
Hide file tree
Showing 78 changed files with 5,727 additions and 124 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
bundler
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module.exports = {
'./common/tsconfig.json',
'./web/tsconfig.json',
'./server/tsconfig.json',
'./web/cypress/tsconfig.json',
'./bundler/tsconfig.json'
],
},
rules: {
Expand All @@ -41,12 +43,12 @@ module.exports = {
'jsx-a11y/heading-has-content': 'off',
'jsx-a11y/anchor-has-content': 'off',
// Disabling this because captions for our media files don't make sense for our use-case
'jsx-a11y/media-has-caption': "off",
'jsx-a11y/media-has-caption': 'off',
// Disabling unused-vars warning when we destructure an object to remove properties e.g.:
// const almostPerfect = {'a': 'awesome', 'b': 'meh', 'c': 'need it'}
// const { b, ...perfect } = almostPerfect -- perfect = {'a': 'awesome', 'c': 'need it'}
// here we don't want the 'b' property so we separate it out and bundle the rest in 'perfect'
'@typescript-eslint/no-unused-vars': ['error', { 'ignoreRestSiblings': true }]
'@typescript-eslint/no-unused-vars': ['error', { 'ignoreRestSiblings': true, "varsIgnorePattern": "^_$" }]
},
settings: {
react: {
Expand All @@ -59,4 +61,4 @@ module.exports = {
typescript: {},
},
},
};
}
1 change: 1 addition & 0 deletions bundler/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
13 changes: 13 additions & 0 deletions bundler/.env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copy this file .env.dist to .env
ENVIRONMENT=local

CLIPS_BUCKET_NAME=common-voice-clips
DATASETS_BUNDLER_BUCKET_NAME=common-voice-bundler

STORAGE_LOCAL_DEVELOPMENT_ENDPOINT=http://storage:8080

DB_HOST=db
DB_PORT=3306
DB_USER=voicecommons
DB_PASSWORD=voicecommons
DB_DATABASE=voiceweb
6 changes: 6 additions & 0 deletions bundler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
js
*.tsv
.env
*.txt
cv-corpus*
32 changes: 32 additions & 0 deletions bundler/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:18-bullseye

RUN apt-get update && \
apt-get install python3-pip vim -y && \
pip3 install --upgrade setuptools

USER node

RUN mkdir -p /home/node/code && \
cd /home/node && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
git clone --depth 1 -b release-v1.0.1 https://github.com/common-voice/CorporaCreator.git && \
git clone --depth 1 -b release-v1.0.0 https://github.com/common-voice/mp3-duration-reporter.git && \
cd CorporaCreator && \
python3 setup.py install --user && \
cd /home/node/mp3-duration-reporter && \
/home/node/.cargo/bin/cargo install --path .

ENV PATH "$PATH:/home/node/.local/bin/:/home/node/.cargo/bin"

WORKDIR /home/node/code

COPY --chown=node ./package.json ./

# Install dependencies
RUN npm install

COPY --chown=node ./ ./

RUN npm run build

CMD ["npm", "run", "start"]
Loading

0 comments on commit 4c8df3f

Please sign in to comment.