Merge pull request #1284 from omnivore-app/fix/docker-compose-content-fetch

Exposes port 9090:8080 in the container
This commit is contained in:
Hongbo Wu 2022-10-06 13:07:43 +08:00 committed by GitHub
commit 4f54ed7feb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 54 deletions

View file

@ -138,10 +138,10 @@ services:
content-fetch:
build:
context: .
dockerfile: ./packages/content-fetch/Dockerfile-local
dockerfile: ./packages/content-fetch/Dockerfile
container_name: "omnivore-content-fetch"
expose:
- 9090
ports:
- "9090:8080"
environment:
- JWT_SECRET=some_secret
- VERIFICATION_TOKEN=some_token

View file

@ -1,51 +0,0 @@
FROM node:14.18-alpine
# Installs latest Chromium (92) package.
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
gcc \
g++ \
python3 \
make \
yarn
# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads /app \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app
# Run everything after as non-privileged user.
WORKDIR /app
ENV CHROMIUM_PATH /usr/bin/chromium-browser
ENV LAUNCH_HEADLESS=true
COPY package.json .
COPY yarn.lock .
COPY tsconfig.json .
COPY .prettierrc .
COPY .eslintrc .
COPY /packages/content-handler/package.json ./packages/content-handler/package.json
RUN yarn install --pure-lockfile
ADD /packages/content-fetch ./packages/content-fetch
ADD /packages/content-handler ./packages/content-handler
RUN yarn workspace @omnivore/content-handler build
# After building, fetch the production dependencies
RUN rm -rf /app/packages/content-fetch/node_modules
RUN rm -rf /app/node_modules
RUN yarn install --pure-lockfile --production
EXPOSE 8080
CMD ["yarn", "workspace", "@omnivore/content-fetch", "start"]