Annotation Database Deployment: Difference between revisions

From MediaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:


This is the main server configuration file, called [https://gitlab.com/rskelly/msea-rov-db/-/blob/main/app/server_config/msea.nginx msea.nginx]. There is a similar file for the staging server, and a further configuration for the Wiki site at [https://gitlab.com/rskelly/msea-rov-db/-/blob/main/app/server_config/wiki.nginx wiki.nginx].
This is the main server configuration file, called [https://gitlab.com/rskelly/msea-rov-db/-/blob/main/app/server_config/msea.nginx msea.nginx]. There is a similar file for the staging server, and a further configuration for the Wiki site at [https://gitlab.com/rskelly/msea-rov-db/-/blob/main/app/server_config/wiki.nginx wiki.nginx].
== Wiki Configuration ==
This site uses [https://www.mediawiki.org/wiki/MediaWiki MediaWiki] and runs on an [https://en.wikipedia.org/wiki/Apache_HTTP_Server Apache] instance which receives requests through Nginx, for the sake of convenience. Configuration is described on [https://www.mediawiki.org/wiki/Manual:System_administration# the MediaWiki site].


== Tile Server Configuration ==  
== Tile Server Configuration ==  


The tile server runs on an Apache instance and receives requests from Nginx. The tile server configuration is described [[Tile Server|here]].
The map tile server runs on an [https://en.wikipedia.org/wiki/Apache_HTTP_Server Apache] instance which receives requests through Nginx. The tile server configuration is described [[Tile Server|here]].


== uWSGI Configuration ==
== uWSGI Configuration ==

Revision as of 22:57, 15 February 2024

Installation

The database, utilities and website are all stored in the same git repository, which is checked out on the server machine and deployed using a single script, install.sh. The script is run from the command line, at which point it will prompt the user to type stage or prod. If the former, the application is deployed to the staging environment; if the latter, it is deployed to the production environment.

Two switches are available:

  • -v will recompile and install the Vue code.
  • -r will reinstall the Python libraries required by the application.

If neither of these steps are required, the installation can be run without them. This is appropriate when only the backend code has been updated.

The database is not automatically updated by the install script. To deploy the database, follow the instructions on the Annotation Database page.

NginxConfiguration

The server uses Nginx to proxy requests to other services, such as the Django applications, tile server and this Wiki. It also loads the default and error pages when necessary.

IP Filtering

Because the site is not open to the public, we need an IP filtering block that will be loaded into each location in the server. This is included by the main configuration file, below. The file is called ipfilter.nginx.

Server, Location Configurations

This is the main server configuration file, called msea.nginx. There is a similar file for the staging server, and a further configuration for the Wiki site at wiki.nginx.

Wiki Configuration

This site uses MediaWiki and runs on an Apache instance which receives requests through Nginx, for the sake of convenience. Configuration is described on the MediaWiki site.

Tile Server Configuration

The map tile server runs on an Apache instance which receives requests through Nginx. The tile server configuration is described here.

uWSGI Configuration

The Django application is served by the uWSGI application server, receiving proxied requests through Nginx.

The configuration file, msea_uwsgi.ini, provides the location of a virtual environment (.venv), and environment variables, in particular the location of the application settings object. The socket through which Nginx communicates with uWSGI and the user under which it runs are also given. There is a similar file for the staging site.

Python Requirements

The requirements file is used by the install script to configure the virtual environment used by uWSGI to serve the application. This file is output by pip freeze.

Firewall Configuration

A script, ufw.sh is run by the install script to reconfigure the firewall so that only necessary services are available to the world.

The exclusion of IPs external to DFO is not performed by the firewall because some services must be available to external users.