Giter Club home page Giter Club logo

server's Introduction

#vss365 today

Get the latest #vss365 prompt.

Background

#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.

Components

#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).

Development

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.

Deployment

This repo contains the required files to deploy #vss365 today on a web server.

First-time deployment

  1. You will need the following software installed on your server:

  2. 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/
    
  3. Run mkdir -p /var/www/vss365today && cd /var/www/vss365today

  4. Run git clone https://github.com/vss365today/server.git && cd server

  5. Run chmod u+x ./init.sh && ./init.sh to set up the required files, folders, user account configurations, and latest code from git.

  6. Place all secret keys for each component in the vss365today/secrets folder. The vss365today/db folder will be used to persist all database files and data.

  7. Run chmod u+x ./build-containers.sh && ./build-containers.sh to create a fresh build of all component containers.

  8. Run chmod u+x ./update-caddy.sh && ./update-caddy.sh to place the Caddyfile file in the proper location on the server.

  9. Start the Caddy server using systemctl enable caddy.service && systemctl start caddy.service.

  10. Run docker-compose up -d to start the entire stack.

Component update deployment

  1. Download the latest source for each updated component.

  2. Run ./build-containers.sh to create a fresh build of all component containers, or manually rebuild just the containers needed.

  3. To restart the entire stack, run docker-compose down && docker-compose up -d

  4. To restart an individual component, run docker-compose down && docker-compose up -d <component_name>

  5. You will want to occasionally run docker system prune -f to remove all old container images.

Server configuration update deployment

  1. Make all required changes in the Caddyfile.

  2. Run ./update-caddy.sh to place the Caddyfile file in the proper location on the server.

  3. Run systemctl reload caddy to make the changes take effect.

Creation

2019-2022 Caleb Ely

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.