mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #368 from omnivore-app/fix/docker-multistage
Fix multistage docker build
This commit is contained in:
commit
addeb37111
4 changed files with 31 additions and 25 deletions
10
.github/workflows/run-tests.yaml
vendored
10
.github/workflows/run-tests.yaml
vendored
|
|
@ -69,7 +69,6 @@ jobs:
|
|||
yarn build
|
||||
yarn lint
|
||||
yarn test
|
||||
|
||||
env:
|
||||
PG_HOST: localhost
|
||||
PG_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||
|
|
@ -78,3 +77,12 @@ jobs:
|
|||
PG_DB: omnivore_test
|
||||
PG_POOL_MAX: 10
|
||||
ELASTIC_URL: http://localhost:${{ job.services.elastic.ports[9200] }}/
|
||||
build-docker-images:
|
||||
name: Build docker images
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build the API docker image
|
||||
run: 'docker build --file packages/api/Dockerfile .'
|
||||
|
|
@ -2,7 +2,7 @@ FROM node:14.18-alpine as builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV NODE_ENV development
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
|
||||
COPY package.json .
|
||||
|
|
@ -14,7 +14,7 @@ COPY .eslintrc .
|
|||
COPY /packages/readabilityjs/package.json ./packages/readabilityjs/package.json
|
||||
COPY /packages/api/package.json ./packages/api/package.json
|
||||
|
||||
RUN yarn install --pure-lockfile --production
|
||||
RUN yarn install --pure-lockfile --development
|
||||
|
||||
ADD /packages/readabilityjs ./packages/readabilityjs
|
||||
ADD /packages/api ./packages/api
|
||||
|
|
|
|||
|
|
@ -36,26 +36,6 @@
|
|||
"@sentry/integrations": "^6.19.1",
|
||||
"@sentry/node": "^5.26.0",
|
||||
"@sentry/tracing": "^5.26.0",
|
||||
"@types/analytics-node": "^3.1.7",
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/chai": "^4.2.18",
|
||||
"@types/chai-string": "^1.4.2",
|
||||
"@types/cookie": "^0.4.0",
|
||||
"@types/cookie-parser": "^1.4.2",
|
||||
"@types/dompurify": "^2.0.4",
|
||||
"@types/express": "^4.17.7",
|
||||
"@types/highlightjs": "^9.12.2",
|
||||
"@types/intercom-client": "^2.11.8",
|
||||
"@types/jsdom": "^16.2.3",
|
||||
"@types/jsonwebtoken": "^8.5.0",
|
||||
"@types/luxon": "^1.25.0",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/oauth": "^0.9.1",
|
||||
"@types/sanitize-html": "^1.27.1",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"@types/urlsafe-base64": "^1.0.28",
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@types/voca": "^1.4.0",
|
||||
"analytics-node": "^6.0.0",
|
||||
"apollo-datasource": "^3.3.1",
|
||||
"apollo-server-express": "^3.6.3",
|
||||
|
|
@ -105,11 +85,29 @@
|
|||
"devDependencies": {
|
||||
"@babel/register": "^7.14.5",
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||
"@types/analytics-node": "^3.1.7",
|
||||
"@types/highlightjs": "^9.12.2",
|
||||
"@types/nanoid": "^3.0.0",
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
"@types/private-ip": "^1.0.0",
|
||||
"@types/analytics-node": "^3.1.7",
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/chai": "^4.2.18",
|
||||
"@types/chai-string": "^1.4.2",
|
||||
"@types/cookie": "^0.4.0",
|
||||
"@types/cookie-parser": "^1.4.2",
|
||||
"@types/dompurify": "^2.0.4",
|
||||
"@types/express": "^4.17.7",
|
||||
"@types/intercom-client": "^2.11.8",
|
||||
"@types/jsdom": "^16.2.3",
|
||||
"@types/jsonwebtoken": "^8.5.0",
|
||||
"@types/luxon": "^1.25.0",
|
||||
"@types/mocha": "^8.2.2",
|
||||
"@types/oauth": "^0.9.1",
|
||||
"@types/sanitize-html": "^1.27.1",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"@types/urlsafe-base64": "^1.0.28",
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@types/voca": "^1.4.0",
|
||||
"chai": "^4.3.4",
|
||||
"chai-string": "^1.5.0",
|
||||
"circular-dependency-plugin": "^5.2.0",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { nanoid } from 'nanoid'
|
|||
import { User } from '../entity/user'
|
||||
import { CreateNewsletterEmailErrorCode } from '../generated/graphql'
|
||||
import { env } from '../env'
|
||||
import addressparser from 'nodemailer/lib/addressparser'
|
||||
import addressparser = require('nodemailer/lib/addressparser')
|
||||
|
||||
const parsedAddress = (emailAddress: string): string | undefined => {
|
||||
const res = addressparser(emailAddress, { flatten: true })
|
||||
|
|
|
|||
Loading…
Reference in a new issue