|
11 months ago | |
---|---|---|
app | 12 months ago | |
client | 12 months ago | |
config | 12 months ago | |
lib | 11 months ago | |
.gitignore | 11 months ago | |
.jshintrc | 1 year ago | |
LICENSE | 12 months ago | |
README.md | 12 months ago | |
deploy | 12 months ago | |
dtp-base-cli.js | 11 months ago | |
dtp-base.js | 12 months ago | |
nodemon.json | 12 months ago | |
package.json | 12 months ago | |
pnpm-lock.yaml | 12 months ago | |
release | 12 months ago | |
restart | 12 months ago | |
start-local | 12 months ago | |
webpack.config.js | 12 months ago |
README.md
DTP Base
A production-ready Node.js application development framework for use in-house at DTP Technologies, LLC.
System Requirements
Make sure you've got the latest/greatest for your Ubuntu.
apt -y update && apt -y upgrade
apt -y install python3-pip build-essential ffmpeg supervisor
The Linux headers and image installs are optional. If you not using a GPU for video encoding, you won't need kernel sources to build your GPU's driver.
apt -y install linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual
The latest pnpm instructions can always be found here: pnpm installation
These are just convenience copies from that page.
corepack enable pnpm
corepack use pnpm@latest
pnpm install
Development Host Management
For convenience, it's possible to open multiple terminals in VS Code using Ctrl + Shift + ~
In one terminal, start the workers and MinIO.
./start-local
In a separate terminal, starts the dev application environment.
pnpm dev
Production Host Configuration
Configure the firewall:
ufw allow ssh
ufw allow http
ufw allow https
ufw allow from [console_ip] proto tcp to [host_ip] port 8190
ufw enable
Create the DTP admin user on the host. All production hosts require this user. Do not set a login password for this user. We will be creating SSH keys for the user to access your git repo as a deployer, but you will never log into the host using the DTP user account.
Instead, we always log in as root, and use su - dtp
to become the DTP user.
adduser dtp # just accept the defaults or enter whatever you want
su - dtp # this will put you in the DTP home directory as the DTP user
ssh-keygen # generate the user's SSH key to use for git deployments
# print the DTP user's SSH public key to provide to git repo as deploy key
cat ~/.ssh/id_rsa.pub
Add that SSH key to your git repo as a deploy key.
In the DTP user's home directory:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
npm install --lts
Edit .bashrc
and set NODE_ENV=production
Emoji Picker
Base currently uses emoji-picker-element as the renderer of an emoji picker, and then it manages the presentation of the picker itself.
License
DTP Base © 2024 DTP Technologies, LLC
All Rights Reserved