wiki/Web-app-general.md
2025-01-28 15:26:40 +01:00

1.7 KiB

Setup of web server

Two instances of the photodiag-web server are hosted on the sf-phmon-01.psi.ch virtual machine, both accessible only from the beamline networks/control rooms:

Server updates

To push a release to the main server:

  1. Pull the latest tested and operational version:

    git pull

  2. Create a new release (choose one of patch, minor, or major):

    python make_release.py patch

  3. Push the new tag(s):

    git push origin main --tags

You can check the release status via GitLab CI/CD pipelines.

Server logs

When logged into either sf-phmon-01 or sf-phmon-02, you can view logs with:

sudo journalctl -u photodiag-<test|prod> -e

Replace <test|prod> with the desired instance.

For example, to see the last 100 lines of logs on sf-phmon-02:

ssh sf-phmon-02
sudo -i
journalctl -u photodiag-test.service -n 100

Restarting the VM or the service

  1. Restart the entire VM:

    sudo reboot
    
  2. Restart a single service (for example, photodiag test or prod):

    sudo systemctl restart <service_name>.service
    

Replace <service_name> with photodiag-test or photodiag-prod.