Skip to content

NewMediaCaucus/nmc-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

695 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Branches

Always name a feature branch "feature" plus description

nmc-website (newmediacaucus.org)

  1. Important File Locations
  2. Workflow Proposal
  3. Production log limits
  4. Further Reading
  5. Rolling Back

Important File Locations

  • Content
    • This folder is managed under a separate repo. See [README-content-folder.md](https://github.com/NewMediaCaucus/nmc-website/blob/dev/README-content-folder.md) for more information.
  • Kirby
    • Leave this alone unless updating the Kirby CMS
  • Media
    • Leave this alone, too. Contents are auto-generated
  • Site
    • Blueprints
      • Controls how the panel operates
    • Snippets
      • PHP code snippets
    • Templates
      • PHP page templates

Workflow Proposal

Kirby relies on four main folders: kirby, media, site, and content. To keep our repo from getting too big, we'll use .gitignore to exclude the media and content folders (with one or two individual-file exceptions).

The dev team should install:

  • Docker or mamp/xamp

  • Github Desktop (https://desktop.github.com/download/) and Git Large File Storage (https://git-lfs.com/)

  • git-lfs

    • Mac users can install git-lfs by running
      • brew install git-lfs
      • git lfs install
      • sudo git lfs install --system
  • Coding IDE (ex: Visual Studio Code)

  • Apache server, php8 (our Docker Compose will do this for you or mampp/xampp)

  • php composer (used to update kirby and install/update plugins into the vendor folder)

Set up local repository:

  • Clone the nmc-website repo at C://xampp/htdocs (win)

  • Clone the nmc-website-content repo. See the README-content-folder.md for how-to

  • Changes focus on site operation and style, not content

  • All changes should have detailed notes

Still needed:

  • Solution to back up content and media folders to offline storage

Production log limits

Production is configured so container and application logs do not fill disk.

Docker container logs (stdout/stderr, i.e., docker logs) are limited by the logging driver:

  • docker-compose.prod.yml and deploy-prod.sh use the json-file driver with max-size: 10m and max-file: 3 for both the webserver and certbot containers. Docker keeps at most three 10 MB log files per container.

Application log files (Apache, PHP, Certbot) in apache-logs/, php-logs/, and letsencrypt-logs/ are rotated on the prod server using logrotate:

  • The config is in logrotate.prod.conf (rotate after 10M, keep 5 rotated files, compress, safe for open files).
  • On the prod server, install it once from the repo root:
    • sudo cp logrotate.prod.conf /etc/logrotate.d/nmc-website
  • If the app is not in /home/nmcdev/nmc-website, edit the paths at the top of logrotate.prod.conf. Logrotate runs via cron (typically daily); no container restart needed.

Further Reading

  1. Git large file storage info
  2. Checking out a previous commit
  3. Resetting the panel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages