-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove yarn * fix type error
- Loading branch information
Showing
17 changed files
with
8,230 additions
and
7,245 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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
node_modules | ||
.esm-cache | ||
dist | ||
*.yml | ||
.git | ||
.gitignore | ||
*.md | ||
*.log | ||
*.yml | ||
*.png | ||
**/*.conf | ||
**/*.service | ||
dist | ||
build | ||
docs | ||
Dockerfile |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 +1,29 @@ | ||
FROM node:current-alpine as builder | ||
FROM node:current-alpine as base | ||
RUN apk add -U build-base python3 | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
RUN npx pnpm i -g pnpm@latest | ||
WORKDIR /usr/src/app | ||
COPY . /usr/src/app | ||
RUN yarn global add node-gyp | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM base AS prod-deps | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile | ||
|
||
FROM base AS build | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
|
||
FROM node:current-alpine | ||
LABEL maintainer="[email protected]" | ||
WORKDIR /usr/src/app | ||
ENV NODE_ENV=production | ||
EXPOSE 3000 | ||
COPY --from=builder /usr/src/app/build /usr/src/app/build | ||
COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules | ||
COPY --from=prod-deps /usr/src/app/node_modules /usr/src/app/node_modules | ||
COPY --from=build /usr/src/app/build /usr/src/app/build | ||
COPY package.json /usr/src/app | ||
RUN apk add -U coreutils openssh-client sshpass && \ | ||
mkdir ~/.ssh | ||
|
||
ENTRYPOINT ["yarn", "start"] | ||
EXPOSE 8000 | ||
CMD [ "pnpm", "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
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ non root user later in the guide. | |
`apt-get` command to be safe. | ||
|
||
`build-essential` - We need this specifically for `node-gyp` to build packages | ||
when using `npm` or `yarn` to install packages. | ||
when using `npm` to install packages. | ||
|
||
As the `root` or `sudo` user run these commands: | ||
|
||
|
@@ -191,9 +191,9 @@ sed -r '/^ssh-ed25519(.*)wetty-keyfile$/d' -i ~/.ssh/authorized_keys | |
|
||
## Install WeTTY | ||
|
||
**Note:** we are using `-g` for `npm` or `global` for `yarn` along with | ||
`--prefix ~/` so that the application's symbolic link is installed to our | ||
`~/bin` directory and available in our local user's `PATH`. | ||
**Note:** we are using `-g` for `npm` along with `--prefix ~/` so that the | ||
application's symbolic link is installed to our `~/bin` directory and available | ||
in our local user's `PATH`. | ||
|
||
As your local user run these commands: | ||
|
||
|
@@ -204,16 +204,10 @@ please run the following command. | |
mkdir -p ~/bin && source ~/.profile | ||
``` | ||
|
||
Now use `npm` to install the `yarn` packet manager. | ||
Then use `npm` to install `wetty`. | ||
|
||
```bash | ||
npm install -g yarn --prefix ~/ | ||
``` | ||
|
||
Then use `yarn` to install `wetty`. | ||
|
||
```bash | ||
yarn global add wetty --prefix ~/ | ||
npm -g i wetty --prefix ~/ | ||
``` | ||
|
||
Once successfully installed the application should be available in your local | ||
|
@@ -649,16 +643,14 @@ behind either: | |
## Updating WeTTY | ||
With `yarn`: | ||
```bash | ||
yarn global upgrade wetty --prefix ~/ | ||
npm -g update wetty --prefix ~/ | ||
``` | ||
To update or downgrade to a specific version you use this command: | ||
```bash | ||
yarn global add [email protected] --prefix ~/ | ||
npm -g i [email protected] --prefix ~/ | ||
``` | ||
Now restart your `wetty` service. | ||
|
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 |
---|---|---|
|
@@ -14,10 +14,10 @@ | |
], | ||
"scripts": { | ||
"build": "snowpack build", | ||
"clean": "rm -rf build yarn-error.log", | ||
"clean": "rm -rf build", | ||
"contributor": "all-contributors", | ||
"dev": "NODE_ENV=development concurrently --kill-others --success first \"snowpack build --watch\" \"nodemon . --conf conf/config.json5\"", | ||
"docker-compose-entrypoint": "ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts; yarn start", | ||
"docker-compose-entrypoint": "ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts; pnpm start", | ||
"lint": "eslint src", | ||
"lint:fix": "eslint --fix src", | ||
"start": "NODE_ENV=production node .", | ||
|
@@ -113,6 +113,7 @@ | |
"prom-client": "^14.0.1", | ||
"response-time": "^2.3.2", | ||
"sass": "^1.54.4", | ||
"serve-static": "^1.15.0", | ||
"socket.io": "^4.5.1", | ||
"socket.io-client": "^4.5.1", | ||
"toastify-js": "^1.9.1", | ||
|
@@ -141,6 +142,7 @@ | |
"@types/node": "^20.2.6", | ||
"@types/parseurl": "^1.3.1", | ||
"@types/response-time": "^2", | ||
"@types/serve-static": "^1.15.3", | ||
"@types/sinon": "^10.0.13", | ||
"@types/toastify-js": "^1.9.2", | ||
"@types/yargs": "^17.0.24", | ||
|
@@ -228,5 +230,5 @@ | |
"Tri Nguyen <[email protected]>", | ||
"Vamshi K Ponnapalli <[email protected]>" | ||
], | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.