Get the latest #vss365 prompt.
#vss365 today is a web app designed to facilitate the delivery of the Twitter-based #vss365 writing prompt. In addition to providing email-based daily notifications, the service also provides a 100% complete archive for every prompt ever used since the inception, with multiple ways to search and consume the data.
#vss365 today is the combination of multiple components, each designed to falicitate development, duties, and deployment. The following is a brief listing of each component and their duty.
-
Web app: A Flask-powered web interface for viewing and downloading prompts.
-
REST API: A Flask-based REST API that handles storing, serving, and searching the prompts.
-
Finder background process: A background process that runs on a regulare schedule to find and save the prompt, as well as trigger daily email notifications.
-
MariaDB database: The primary database for storing all records and information.
-
Automatic database backups: Because data backups are important. Process is set to run at midnight UTC. Backups are located in the
/backup
directory (see below for details).
You will need to install the following software to run the entire platform on your computer:
It is recommended to install the following software to facilitate development:
Each component may additionally have its own specific requirements. Check the specific component readme for details.
This repo contains the required files to deploy #vss365 today on a web server.
-
You will need the following software installed on your server:
- A working Docker and docker-compose runtime
- Caddy, not running as a container or inside the #vss365 today container stack.
-
Ensure you are following this structure when downloading all component setup:
/var/www/ vss365today/ api/ backup/ db/ finder/ secrets/ server/ static/ downloads/ images/ temp/ web/
-
Run
mkdir -p /var/www/vss365today && cd /var/www/vss365today
-
Run
git clone https://github.com/vss365today/server.git && cd server
-
Run
chmod u+x ./init.sh && ./init.sh
to set up the required files, folders, user account configurations, and latest code from git. -
Place all secret keys for each component in the
vss365today/secrets
folder. Thevss365today/db
folder will be used to persist all database files and data. -
Run
chmod u+x ./build-containers.sh && ./build-containers.sh
to create a fresh build of all component containers. -
Run
chmod u+x ./update-caddy.sh && ./update-caddy.sh
to place theCaddyfile
file in the proper location on the server. -
Start the Caddy server using
systemctl enable caddy.service && systemctl start caddy.service
. -
Run
docker-compose up -d
to start the entire stack.
-
Download the latest source for each updated component.
-
Run
./build-containers.sh
to create a fresh build of all component containers, or manually rebuild just the containers needed. -
To restart the entire stack, run
docker-compose down && docker-compose up -d
-
To restart an individual component, run
docker-compose down && docker-compose up -d <component_name>
-
You will want to occasionally run
docker system prune -f
to remove all old container images.
-
Make all required changes in the
Caddyfile
. -
Run
./update-caddy.sh
to place theCaddyfile
file in the proper location on the server. -
Run
systemctl reload caddy
to make the changes take effect.
2019-2022 Caleb Ely