mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add Dockerfile for text-to-speech
This commit is contained in:
parent
4ced49c4f3
commit
1024e5e5d6
4 changed files with 35 additions and 14 deletions
5
packages/text-to-speech/.dockerignore
Normal file
5
packages/text-to-speech/.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
node_modules
|
||||
build
|
||||
.env*
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
27
packages/text-to-speech/Dockerfile
Normal file
27
packages/text-to-speech/Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
FROM node:14.18-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
COPY tsconfig.json .
|
||||
COPY .prettierrc .
|
||||
COPY .eslintrc .
|
||||
|
||||
COPY /packages/text-to-speech/package.json ./packages/text-to-speech/package.json
|
||||
|
||||
RUN yarn install --pure-lockfile
|
||||
|
||||
ADD /packages/text-to-speech ./packages/text-to-speech
|
||||
RUN yarn workspace @omnivore/text-to-speech-handler build
|
||||
|
||||
# After building, fetch the production dependencies
|
||||
RUN rm -rf /app/packages/text-to-speech/node_modules
|
||||
RUN rm -rf /app/node_modules
|
||||
RUN yarn install --pure-lockfile --production
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["yarn", "workspace", "@omnivore/text-to-speech-handler", "start"]
|
||||
|
||||
|
|
@ -25,7 +25,9 @@
|
|||
"@types/natural": "^5.1.1",
|
||||
"@types/node": "^14.11.2",
|
||||
"@types/underscore": "^1.11.4",
|
||||
"eslint-plugin-prettier": "^4.0.0"
|
||||
"chai": "^4.3.6",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"mocha": "^10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@google-cloud/functions-framework": "3.1.2",
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
import { expect } from 'chai'
|
||||
import 'chai/register-should'
|
||||
import chaiString from 'chai-string'
|
||||
|
||||
chai.use(chaiString)
|
||||
|
||||
describe('Stub test', () => {
|
||||
it('should pass', () => {
|
||||
expect(true).to.be.true
|
||||
})
|
||||
})
|
||||
Loading…
Reference in a new issue