Always name a feature branch "feature" plus description
- 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.
- This folder is managed under a separate repo. See
- 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
- Blueprints
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/)
-
- Mac users can install git-lfs by running
- brew install git-lfs
- git lfs install
- sudo git lfs install --system
- Mac users can install git-lfs by running
-
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 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-filedriver withmax-size: 10mandmax-file: 3for 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 oflogrotate.prod.conf. Logrotate runs via cron (typically daily); no container restart needed.