-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 Notifications and RWD release
2.0.0
(#4644)
- Loading branch information
Showing
320 changed files
with
31,666 additions
and
2,749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Backend Docker | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- packages/server/** | ||
|
||
# Docker images will only be pushed when we manually dispatch this workflow | ||
workflow_dispatch: | ||
inputs: | ||
docker_image_tag: | ||
description: 'Tag to use on docker image, eg. "latest", or "next"' | ||
required: true | ||
default: "next" | ||
|
||
jobs: | ||
docker: | ||
name: Build Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build (production) | ||
uses: docker/build-push-action@v3 | ||
with: | ||
# Do not use local dir context to ensure we can build from a commit directly | ||
# context: . | ||
file: backend.Dockerfile | ||
push: ${{ github.event_name == 'workflow_dispatch' }} | ||
tags: joystream/pioneer-backend:${{ github.event.inputs.docker_image_tag || 'next' }} | ||
|
||
- name: Build (dev) | ||
uses: docker/build-push-action@v3 | ||
with: | ||
# Do not use local dir context to ensure we can build from a commit directly | ||
# context: . | ||
file: backend.dev.Dockerfile | ||
push: ${{ github.event_name == 'workflow_dispatch' }} | ||
tags: joystream/pioneer-backend-dev:${{ github.event.inputs.docker_image_tag || 'next' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM node:20 AS base | ||
WORKDIR /app | ||
|
||
RUN set -eux; \ | ||
apt-get update -y; \ | ||
apt-get install -y --no-install-recommends openssl; \ | ||
rm -rf /var/lib/apt/list/* | ||
|
||
FROM base AS builder | ||
|
||
COPY packages/server/package.json ./ | ||
COPY packages/server/docker/yarn.lock ./ | ||
RUN yarn --immutable | ||
|
||
COPY tsconfig.json ./base.tsconfig.json | ||
COPY packages/server/tsconfig.json ./ | ||
RUN sed -i 's/"extends":.*/"extends": ".\/base.tsconfig.json",/' tsconfig.json | ||
|
||
COPY packages/server/prisma ./ | ||
COPY packages/server/codegen.ts ./ | ||
COPY packages/server/src ./src | ||
RUN yarn build:local | ||
|
||
RUN rm -rf node_modules | ||
ENV NODE_ENV=production | ||
RUN yarn --prod --immutable | ||
RUN yarn prisma generate | ||
|
||
FROM base | ||
|
||
USER www-data | ||
|
||
COPY --from=builder --chown=www-data /app/dist ./dist | ||
COPY --from=builder --chown=www-data /app/node_modules ./node_modules | ||
COPY packages/server/prisma ./prisma | ||
COPY packages/server/docker/prod/entrypoint.sh /entrypoint.sh | ||
COPY packages/server/docker/prod/notify.sh /usr/bin/notify | ||
|
||
ENV QUERY_NODE_ENDPOINT "https://query.joystream.org/graphql" | ||
ENV PIONEER_URL "https://pioneerapp.xyz" | ||
ENV STARTING_BLOCK 1 | ||
ENV NODE_ENV=production | ||
ENV APP_LOG_LEVEL "verbose" | ||
ENV PORT 3000 | ||
EXPOSE 3000/tcp | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["api"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM node:20-alpine3.18 AS builder | ||
WORKDIR /app | ||
|
||
COPY packages/server/package.json ./ | ||
COPY packages/server/docker/yarn.lock ./ | ||
RUN yarn --immutable | ||
|
||
COPY tsconfig.json ./base.tsconfig.json | ||
COPY packages/server/tsconfig.json ./ | ||
RUN sed -i 's/"extends":.*/"extends": ".\/base.tsconfig.json",/' tsconfig.json | ||
|
||
COPY packages/server/prisma ./ | ||
COPY packages/server/codegen.ts ./ | ||
COPY packages/server/src ./src | ||
RUN yarn build:local | ||
|
||
RUN rm -rf node_modules | ||
ENV NODE_ENV=production | ||
RUN yarn --prod --immutable | ||
RUN yarn prisma generate | ||
|
||
FROM postgres:16.0-alpine3.18 | ||
WORKDIR /app | ||
RUN apk add --no-cache nodejs | ||
|
||
COPY --from=builder --chown=postgres /app/dist ./dist | ||
COPY --from=builder --chown=postgres /app/node_modules ./node_modules | ||
COPY packages/server/prisma ./prisma | ||
COPY packages/server/docker/dev/entrypoint.sh /entrypoint.sh | ||
COPY packages/server/docker/dev/notify.sh /usr/bin/notify | ||
COPY packages/server/docker/dev/env.sh ./ | ||
COPY packages/server/docker/dev/prisma-deploy.sh /docker-entrypoint-initdb.d/ | ||
|
||
ENV QUERY_NODE_ENDPOINT "https://query.joystream.org/graphql" | ||
ENV PIONEER_URL "https://pioneerapp.xyz" | ||
ENV STARTING_BLOCK 1 | ||
ENV APP_LOG_LEVEL "verbose" | ||
ENV PORT 3000 | ||
EXPOSE 3000/tcp | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["api"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,22 +10,20 @@ | |
] | ||
}, | ||
"scripts": { | ||
"lint": "wsrun --package @joystream/pioneer -c lint", | ||
"lint:fix": "wsrun --package @joystream/pioneer -c lint:fix", | ||
"build": "wsrun --fast-exit --stages -c --exclude @joystream/markdown-editor build", | ||
"build:storybook": "wsrun --fast-exit --stages -c --exclude @joystream/pioneer --exclude-missing build && wsrun --package @joystream/pioneer -c build:storybook", | ||
"lint": "wsrun -x @joystream/markdown-editor -c lint", | ||
"lint:fix": "wsrun -x @joystream/markdown-editor -c lint:fix", | ||
"build": "wsrun --fast-exit --package @joystream/pioneer -c build", | ||
"build:storybook": "wsrun --fast-exit --stages -p @joystream/markdown-editor -c build && wsrun -p @joystream/pioneer -c build:storybook", | ||
"storybook": "wsrun --exclude-missing -c storybook", | ||
"test": "wsrun --fast-exit --package @joystream/pioneer -c test", | ||
"test": "wsrun --fast-exit --exclude-missing -c test", | ||
"test-storybook": "wsrun --package @joystream/pioneer -c test-storybook", | ||
"start": "wsrun --package @joystream/pioneer -c start", | ||
"prepare": "husky install" | ||
}, | ||
"dependencies": { | ||
"eslint-plugin-import": "^2.23.4", | ||
"wsrun": "^5.2.4" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.50.0", | ||
"@typescript-eslint/parser": "^5.50.0", | ||
"husky": ">=6", | ||
"lint-staged": ">=10" | ||
}, | ||
|
@@ -52,11 +50,11 @@ | |
"@joystream/[email protected]": "patch:@joystream/js@npm%3A1.2.0#./.yarn/patches/@joystream-js-npm-1.2.0-a8795e7496.patch" | ||
}, | ||
"engines": { | ||
"node": ">=14.18.0", | ||
"node": ">=18", | ||
"yarn": "^1.22.0" | ||
}, | ||
"lint-staged": { | ||
"packages/ui/src/**/*.{js,ts,tsx,html}": [ | ||
"packages/{ui,server}/src/**/*.{js,ts,tsx,html}": [ | ||
"eslint --fix", | ||
"prettier --write" | ||
] | ||
|
Oops, something went wrong.
1031792
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
dao – ./
dao-joystream.vercel.app
dao-git-main-joystream.vercel.app
pioneerapp.xyz
dao.joystream.org