Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Maintnance

Pavel Skipenes edited this page Aug 23, 2022 · 9 revisions

General about package upgrades

This project is hosted on a shared hosting service. That means no root access on the server and we cannot control what software are installed or running. At this time we have to deal with php, apache and mysql for the database.

Docker containers in this repository have been created to simplify development process and to somewhat replicate the hosting environment. Early in the development process the development involved ssh-ing into the server, editing source files with vim and guessing why noting is working when accessing the web pages through the internet. Logs were not available and site usually broke when admin would upgrade software on the server that ended up introducing breaking changes.

Project is fairly old and earliest database entries was from early 2000. There was no vcs in place before this one therefore determining the age of this project is fairly hard. This repository is an attempt to simplify the development process and be one step ahead rather than one step behind. If you have contributed to this project earlier contact us and we will add you to as an author.

New maintainers

If you're a new maintainer this section is for you. The most important skill to master is mysql and PHP. Watch through Gio's PHP series on PHP. Those videos cover pretty much everything you need to know about PHP. mysql and databases are not covered in that series but there comes up some simple syntax along the way. I would recommend looking into topics like what a relational database is to at least get started with it. Use phpmyadmin. It's a graphical user interface for managing database that might come in handy when starting out.

Also subscribe to news from hosting provider about planned maintenance. That and more is covered in the internal docs on slab.

PHP

PHP has some huge issues but PHP developers are slowly fixing them for the better with each new release. Check the server what version that are running and use that version in the containers. Patches can be applied freely but minor and major versions must match. Make sure that all deprecation warnings have been resolved by reading migration guides from PHP.

To use a certain version of PHP in the project set config->platform->php to be the PHP version as the same as on production server. That way you'll never accidentally use a new feature in development and push to production before production server has had a change to update its packages.

    "config": {
        "platform": {
            "php": "8.1.2"
        }
    },

You'll also have to specify minimum PHP version that is needed in the project depending on what features you use:

    "require": {
        "php": "^8.1.2",
        ...
    },

Set the same version in config->platform->php and in require->php to allow developers to use updated functionality.

front end

Nodejs is fairly popular to develop new web sites however since the project is being run on shared hosting then there are no way for us to spin up a node server without root access. Current workaround is to export a static page and make the backend serve only that static site. This is actually a good solution since it allows use of new javascript frameworks (which as we all know a new one is released each week) witch eliminates the project to be written in plain javascipt. And if the front end is at some point out of date a new one can be easily swapped without affecting any backend code.

At this time a new frontend is being developed at this repository and hopefully soon it will be merged into this repository with all its commit history.

Mysql

TODO:

  • database migrations

apache

TODO:

  • apache configuration for local environment
  • base url for shared hosting in production and in development
  • .htaceess file for production and development

Containers and docker

Upgrade to latest. There is no need to check the server for that. Nota that some developers use different different platform architectures like arm and x86 so don't use a docker image that is restrictive on that.

This project will also soon provide a development container that allows users, no matter their platform, to get up and running without trashing their own system with development packages. This also provides consistent development environment which will reduce the hassle of getting started with the project and reduce number of this-works-on-my-machine kind of bugs.

Documentation

try to keep as much of the project documentation available on GitHub as possible. That way other people and organizations can fairly easily get into this project. Some documentation, specific to our hosting providing and our use case, should be places inside internal documentation. Make it as easy as possible to get the project up and running for new developers.

Clone this wiki locally