The DTP Sites web app development engine.
https://digitaltelepresence.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
6.4 KiB
139 lines
6.4 KiB
2 years ago
|
# DTP Sites
|
||
2 years ago
|
|
||
2 years ago
|
DTP Sites is an open source blogging platform built on Node.js and the DTP ecosystem.
|
||
2 years ago
|
|
||
|
## Requirements
|
||
|
|
||
2 years ago
|
The only qualified operated system for hosting a DTP Sites suite is [Ubuntu 20.04 LTS](https://releases.ubuntu.com/20.04/). 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 can be had for production environments.
|
||
2 years ago
|
|
||
1 year ago
|
## Install Build Tools (for mediasoup support)
|
||
|
|
||
|
```sh
|
||
|
apt-get -y install build-essential python3-pip
|
||
|
```
|
||
|
|
||
12 months ago
|
## Host Preparation
|
||
|
The following commands must be exeucted on any host expected to run DTP Framework applications.
|
||
|
|
||
|
```sh
|
||
|
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
|
||
|
```
|
||
|
|
||
2 years ago
|
## Install Data Tier Components
|
||
2 years ago
|
|
||
2 years ago
|
You will need MongoDB and MinIO installed and running before you can start DTP Sites web services.
|
||
2 years ago
|
|
||
|
1. [Install MongoDB](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/)
|
||
|
2. [Install MinIO](https://docs.min.io/docs/minio-quickstart-guide.html)
|
||
|
|
||
|
Install redis:
|
||
|
```sh
|
||
|
sudo apt-get install redis
|
||
|
```
|
||
|
|
||
2 years ago
|
## Install Node Version Manager (NVM) and Node.js
|
||
2 years ago
|
|
||
2 years ago
|
```sh
|
||
|
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
||
|
```
|
||
2 years ago
|
|
||
2 years ago
|
## 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.
|
||
|
|
||
|
```sh
|
||
|
nvm install --lts
|
||
|
npm install -g yarn gulp forever
|
||
|
```
|
||
2 years ago
|
|
||
2 years ago
|
## Preparing a Fresh Install
|
||
2 years ago
|
|
||
2 years ago
|
### Clone the DTP Sites Repository
|
||
2 years ago
|
```sh
|
||
2 years ago
|
cd ~/live
|
||
2 years ago
|
git clone [email protected]:digital-telepresence/dtp-sites.git
|
||
2 years ago
|
```
|
||
|
### Install Required Dependencies
|
||
|
```sh
|
||
2 years ago
|
cd ~/live/dtp-sites
|
||
2 years ago
|
yarn
|
||
|
```
|
||
2 years ago
|
### Generate SSL/TLS Certificate
|
||
|
```sh
|
||
2 years ago
|
cd ~/live/dtp-sites/ssl
|
||
2 years ago
|
./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.
|
||
2 years ago
|
|
||
2 years ago
|
## Starting DTP Sites In Development Mode
|
||
2 years ago
|
|
||
|
1. Make sure `NODE_ENV` is set to `local`
|
||
2 years ago
|
2. Run `./start-local` in a VS Code terminal, then rename that terminal to `services`.
|
||
2 years ago
|
3. In a new VS Code terminal, run `gulp` and rename that terminal `gulp`.
|
||
|
4. 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.
|
||
|
|
||
2 years ago
|
DTP Sites is a multi-tier web hosting engine built on:
|
||
2 years ago
|
|
||
|
- [MongoDB](https://www.mongodb.com/)
|
||
|
- [Redis](https://redis.io/)
|
||
|
- [MinIO](https://min.io/)
|
||
|
- [Node.js](https://nodejs.org/en/)
|
||
|
- [ExpressJS](http://expressjs.com/)
|
||
|
- [UIkit](https://getuikit.com/)
|
||
|
|
||
|
## Production Environment Information
|
||
|
|
||
2 years ago
|
The only qualified operated system for hosting a DTP Sites suite is [Ubuntu 20.04 LTS](https://releases.ubuntu.com/20.04/). 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.
|
||
2 years ago
|
|
||
2 years ago
|
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.
|
||
|
|
||
|
- [MongoDB](https://docs.mongodb.com/launch-manage/)
|
||
|
|
||
|
Some useful links for learning more about hosting MinIO:
|
||
|
|
||
|
- [Quick Start](https://docs.min.io/docs/minio-quickstart-guide.html)
|
||
|
- [Configuration](https://docs.min.io/docs/minio-server-configuration-guide.html)
|
||
|
|
||
|
- [Docker](https://docs.min.io/docs/minio-docker-quickstart-guide.html)
|
||
|
- [Distributed](https://docs.min.io/docs/distributed-minio-quickstart-guide.html)
|
||
|
- [Monitoring](https://docs.min.io/docs/minio-monitoring-guide.html)
|
||
|
|
||
|
- [Security Overview](https://docs.min.io/docs/minio-security-overview.html)
|
||
|
- [TLS](https://docs.min.io/docs/how-to-secure-access-to-minio-server-with-tls.html)
|
||
|
|
||
|
|
||
|
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.
|
||
|
|
||
|
- [Quick Start](https://redis.io/topics/quickstart)
|
||
|
|
||
|
- [Access Control Lists](https://redis.io/topics/acl)
|
||
|
- [Administration](https://redis.io/topics/admin)
|
||
|
- [Configuration](https://redis.io/topics/config)
|
||
|
- [Encryption](https://redis.io/topics/encryption)
|
||
|
- [High Availability](https://redis.io/topics/sentinel)
|
||
|
- [Persistence](https://redis.io/topics/persistence)
|
||
|
- [Replication](https://redis.io/topics/replication)
|
||
|
- [Security](https://redis.io/topics/security)
|
||
|
- [Signals](https://redis.io/topics/signals)
|
||
|
|
||
|
## Software License
|
||
|
|
||
4 months ago
|
DTP Sites and the DTP Phoenix Engine and framework are licensed under the [Apache 2.0](https://spdx.org/licenses/Apache-2.0.html) open source software license. See [LICENSE](LICENSE) for more information.
|
||
|
|
||
|
Uses postal code data provided by SimpleMaps: https://simplemaps.com/data/us-zips. The data is used to find geographic coordinates for a postal code. Those coordinates are then used to request weather data for that location.
|
||
|
|
||
|
Uses GeoIP-Lite data to geolocate HTTP requests by source IP address. The data is used to find geographic coordinates for an IP address to request weather data for that location. IP addresses and related information may be used for recordkeeping and to help balance traffic while also seeing (roughly) where it comes from in aggregate reports.
|