|
2 years ago | |
---|---|---|
.vscode | 3 years ago | |
app | 2 years ago | |
client | 2 years ago | |
config | 2 years ago | |
docker | 3 years ago | |
docs | 3 years ago | |
lib | 2 years ago | |
ssl | 3 years ago | |
static | 3 years ago | |
supervisord | 3 years ago | |
.dockerignore | 3 years ago | |
.env.default | 2 years ago | |
.env.docker.default | 3 years ago | |
.gitignore | 2 years ago | |
.jshintrc | 3 years ago | |
Dockerfile | 3 years ago | |
LICENSE | 3 years ago | |
NOTES.md | 3 years ago | |
README.md | 2 years ago | |
deploy | 3 years ago | |
docker-build | 3 years ago | |
docker-clean | 3 years ago | |
docker-compose.yml | 3 years ago | |
docker-console | 3 years ago | |
docker-proxy | 3 years ago | |
dtp-base.code-workspace | 3 years ago | |
dtp-media-engine.js | 2 years ago | |
dtp-webapp-cli.js | 2 years ago | |
dtp-webapp.js | 2 years ago | |
gulpfile.js | 3 years ago | |
package.json | 2 years ago | |
push | 3 years ago | |
release | 3 years ago | |
restart-production | 3 years ago | |
start-local | 3 years ago | |
start-production | 3 years ago | |
stop-production | 3 years ago | |
update-deps.js | 3 years ago | |
yarn.lock | 2 years ago |
README.md
Digital Telepresence Base
The base project from which all others are forked when working with my framework and system. You don't have to start from this project at all. BUT, it can save you a lot of time by simply being a 100% compatible base on which you can build your apps and sites.
Host Preparation
The following commands must be exeucted on any host expected to run DTP Framework applications.
apt -y update && apt -y upgrade
apt -y install linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual
apt -y install build-essential ffmpeg supervisor
Install Data Tier Components
You will need MongoDB and MinIO installed and running before you can start DTP Base web services.
Install redis:
sudo apt-get install redis
Install Node Version Manager (NVM) and Node.js
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Resolve Global Node Dependencies
Yarn, Gulp, and Forever are required to be installed globally. This should be done once per developer workstation and repeated when updates are required.
nvm install --lts
npm install -g yarn gulp forever
Preparing a Fresh Install
Clone the DTP Base Repository
cd ~/live
git clone [email protected]:digital-telepresence/dtp-base.git
Install Required Dependencies
cd ~/live/dtp-base
yarn
Generate SSL/TLS Certificate
cd ~/live/dtp-base/ssl
./mkcert
Environment Configuration
On a new host or host image, copy .env.default
to .env
and edit it as necessary.
For password salt and service passwords, the uuidgen
tool may be useful to help generate hard-to-guess passwords for use in a development environment. Something more sophisticated than a UUID should be used in production.
Starting DTP Base In Development Mode
- Make sure
NODE_ENV
is set tolocal
- Run
./start-local
in a VS Code terminal, then rename that terminal toservices
. - In a new VS Code terminal, run
gulp
and rename that terminalgulp
. - Open https://localhost:3000 in your web browser.
You can now make changes to program source code, and the environment will automatically respond, build, pack, and re-load things as needed depending on what you did and what's open/running.
DTP Base is a multi-tier web hosting engine built on:
Production Environment Information
The only qualified operated system for hosting a DTP Base suite is Ubuntu 20.04 LTS. It is acceptable to run it in a virtual machine for development and testing, but it should be run as close to bare metal as possible in production environments.
It's impossible to give 100% generic advice here, but it all depends on how large your audience is and how much they use your website. Larger, more active audiences will require a different kind of production server deployment than smaller and less active audiences.
Generally, it's possible to stack all components on one host and operate a fast site for small-to-medium audiences. The size of the host may vary, but it's possible to keep the system stacked and handle quite a large audience.
Beyond a point, you'll need to start isolating services away from each other. Storage will want it's own system(s), MongoDB will want it's own systems (plural), Redis will want it's own system(s), and the Node.js components can each start to want their own system(s).
Once you start scaling horizontally, the host requirements change a little. You will need two networks and network interfaces per host. The production network to handle public requests; and a management network for handling IPC and data-sharing among the hosts themselves.
Some useful links for learning more about hosting MinIO:
Redis simply has many different documents to describe it's many different features and their requirements. I'd like to give you a summary page link, but it doesn't exist. This is that summary page. These are those links.
Software License
The DTP Base and the DTP Phoenix Engine and framework are licensed under the Apache 2.0 open source software license. See LICENSE for more information.