mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 08:47:13 +08:00
53e168ae93
* feat: moderation config * feat: configure banned and suspect words * chore: upgrade react and test libs to the newest version <3 * chore: upgrade typescript + some refactor * feat: general, organization and advanced configuration panes * fix: translation * feat: speedup fetching markdown editor * feat: localize markdown editor * chore: refactor container names * chore: rename infobox to communityGuidelines * feat: closing comment streams duration config * test: add feature tests for configurations * fix: mock only console.error * chore: upgrade node * chore: require node >= 10 * fix: better validation and default values * feat: Make DurationField a general purpose component and reuse for Edit Comment Timeframe * test: add unit test for duration field * fix: patch for bug when built in production * chore: bump npm version to latest * fix: adapted Dockerfile to new version of node * refactor: harmonized seconds/milliseconds to seconds * fix: resolve bug from merge conflict
43 lines
923 B
Docker
43 lines
923 B
Docker
FROM node:10-alpine
|
|
|
|
# Install build dependancies.
|
|
RUN apk --no-cache add git
|
|
|
|
# Create app directory.
|
|
RUN mkdir -p /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
# Setup the environment for production.
|
|
ENV NODE_ENV production
|
|
|
|
# Bundle application source.
|
|
COPY . /usr/src/app
|
|
|
|
# Install build static assets and clear caches.
|
|
RUN NODE_ENV=development npm install && \
|
|
npm run generate && \
|
|
npm run build && \
|
|
npm prune --production
|
|
|
|
FROM node:10-alpine
|
|
|
|
# Create app directory
|
|
RUN mkdir -p /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy the compiled source into the new stage.
|
|
COPY --from=0 /usr/src/app .
|
|
|
|
# Setup the environment
|
|
ENV PATH /usr/src/app/bin:$PATH
|
|
ENV PORT 5000
|
|
EXPOSE 5000
|
|
ENV NODE_ENV production
|
|
|
|
# Store the current git revision.
|
|
ARG REVISION_HASH
|
|
RUN mkdir dist/core/common/__generated__ && \
|
|
echo "{\"revision\": \"${REVISION_HASH}\"}" > dist/core/common/__generated__/revision.json
|
|
|
|
CMD ["npm", "run", "start"]
|