-
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from blenderskool/next
Blaze v2.0.0 🎉
- Loading branch information
Showing
144 changed files
with
19,350 additions
and
11,760 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/node_modules | ||
app.json | ||
.now | ||
.vercel | ||
client/build |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
size-plugin.json | ||
.vercel/ | ||
.now/ |
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,5 @@ | ||
node_modules/ | ||
build/ | ||
size-plugin.json | ||
server/ | ||
nginx/ |
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,47 @@ | ||
# Contributing to Blaze | ||
Thanks for contributing to Blaze :zap:! Make sure to **Fork** this repository into your account before making any commits. | ||
|
||
## Project setup | ||
Run the following commands to set up Blaze on your system | ||
```bash | ||
git clone https://github.com/<your-github-username>/blaze | ||
git remote add upstream https://github.com/blenderskool/blaze.git | ||
cd blaze | ||
npm install | ||
``` | ||
|
||
## Creating a feature branch | ||
All development happens on the `next` branch. The `master` branch contains the known stable version of Blaze. To make your contributions, create a new branch from `next`. | ||
```bash | ||
git checkout -b my-branch next | ||
``` | ||
|
||
## Development server | ||
In most cases you would want to run the dev server for both frontend and backend to test your changes. Hence start the dev server by running the following command at the root of the project. This would start two servers: | ||
- The backend server at port `3030`. | ||
- The frontend live server at port `8080`. | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Commiting your changes and creating a PR | ||
Now you can make your changes, and commit them. We don't have any specific convention as of now, but try to have a clear and summarized message for your commits. Refer https://chris.beams.io/posts/git-commit/#seven-rules for guidelines. | ||
|
||
```bash | ||
git add . | ||
git commit -m "My fixes" | ||
``` | ||
|
||
Sync your forked repository with the changes in this(upstream) repository | ||
```bash | ||
git fetch upstream | ||
git rebase upstream/next | ||
``` | ||
|
||
Push the changes to your fork. | ||
```bash | ||
git push origin my-branch | ||
``` | ||
|
||
This is a good time, to open a pull request in this repository with the changes you have made. Make sure you open a pull request to merge to `next` branch and not the `master` branch directly. |
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 |
---|---|---|
@@ -1,14 +1,45 @@ | ||
FROM node:10.16.3 AS base | ||
|
||
WORKDIR /app | ||
|
||
FROM base AS build | ||
COPY . . | ||
RUN npm install && \ | ||
npm run build | ||
COPY ./client/package*.json ./client/ | ||
|
||
WORKDIR /app/client | ||
RUN npm install | ||
|
||
ARG WS_HOST | ||
ARG WS_SIZE_LIMIT | ||
ARG TORRENT_SIZE_LIMIT | ||
|
||
ENV WS_HOST $WS_HOST | ||
ENV WS_SIZE_LIMIT $WS_SIZE_LIMIT | ||
ENV TORRENT_SIZE_LIMIT $TORRENT_SIZE_LIMIT | ||
|
||
COPY ./client . | ||
COPY ./common ../common | ||
RUN npm run build | ||
|
||
|
||
FROM nginx:alpine | ||
|
||
# Installing node and npm | ||
RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/main libuv \ | ||
&& apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.9/main/ nodejs=10.19.0-r0 npm=10.19.0-r0 | ||
|
||
COPY ./nginx/image-nginx.template /etc/nginx/nginx.template | ||
COPY --from=base /app/client/build /etc/nginx/html | ||
|
||
WORKDIR /app | ||
|
||
COPY ./server/package*.json ./server/ | ||
|
||
WORKDIR /app/server | ||
RUN npm install | ||
|
||
COPY ./server . | ||
COPY ./common ../common | ||
COPY ./package*.json ../ | ||
|
||
FROM base AS release | ||
COPY --from=build /app/node_modules ./node_modules | ||
COPY --from=build /app/dist ./dist | ||
COPY --from=build /app/index.js ./ | ||
EXPOSE 3030 | ||
CMD ["node", "index.js"] | ||
|
||
CMD ["sh", "-c", "envsubst '$PORT' < /etc/nginx/nginx.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;' & PORT=3030 npm run start"] |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ | ||
"name": "Blaze", | ||
"description": "A file sharing web app using WebSockets and WebRTC", | ||
"description": "A file sharing web app using WebTorrent and WebSockets", | ||
"repository": "https://github.com/blenderskool/blaze", | ||
"logo": "https://github.com/blenderskool/blaze/raw/master/static/images/apple-touch-icon-152x152.png", | ||
"keywords": ["productivity", "node", "websockets", "webrtc", "socketio", "svelte", "express", "file-sharing"] | ||
"keywords": ["productivity", "node", "websockets", "webtorrent", "preact", "peer-to-peer", "express", "file-sharing"], | ||
"stack": "container", | ||
"website": "https://blaze.now.sh" | ||
} |
File renamed without changes.
Oops, something went wrong.