Skip to content

Installing and Running Archetype

Peter Stokes edited this page Jul 6, 2021 · 6 revisions

Personal instance of Archetype

To try out Archetype or use it for your personal research please install it using Docker:

https://hub.docker.com/r/kingsdigitallab/archetype/

Please make sure you read the important comments storing your data outside the Docker container.

Shared instance of Archetype

If you want to expose your Archetype site to the public or you want to allow other people to edit the content then the Docker instance won't be enough. You will need an experienced software developer or system administrator to deploy Archetype on a web server for you. Please contact the Archetype Team of King's Digital Lab if you need assistance with that.

Although we have deployed many instances of the site for research projects, we don't have complete, detailed or up to date instructions on how to do it. If you have the system admin skills, you can get a long way by installing Archetype with Docker on your machine then stepping inside the container to look at the way it works. All the information you need is in Github, within the /build folder. The architecture is robust but you'll need to review the configuration and installation details to make sure it matches your own production requirements.

To you install Archetype manually, outside docker, you'll need to clone the digipal repository, create your own project configuration and link the digipal folders from within your project folder. You can see a working example of that in the Scriba project repo, check the readme file and the structure of the repo:

https://github.com/kingsdigitallab/archetype-scriba

Troubleshooting

Here are some pointers to solving problems that people have had in the past, in case these are helpful.

local_settings.py setup

The file digipal/local_settings.template.py should be copied, renamed as local_settings.py and moved to the digipal_build folder as part of the setup process. At a minimum you will want to change the database connection parameters (particularly the default password, for whihc see also below), and probably fix the image server host (for which the default is localhost).

Database startup error

If you are using build/startup.sh, note that this uses supervisord.conf where the absolute path is hard-coded for PostgreSQL. This path has version 9.5 hard-coded and so will need to be changed for other versions.

Database connection error

Ensure that the PostgreSQL server has the correct database and user: you will probably need to create the database and user and set permissions manually. This is sometimes also the case even when installing from the Docker build. Example instructions for PostgreSQL can be found at (https://github.com/kingsdigitallab/archetype-scriba#database) or in the obsolete page on Installing Archetype on a Web Server, adjusting the details to match your local_settings.py. This step must of course be done before running python manage.py migrate or other Django interactions with the database.

Nginx startup error

If you are installing from scratch, be aware that nginx normally starts automatically after installation. This means that the Archetype startup.sh script will fail if it is run immediately after installation, since port 80 will already be occupied. Be sure then that nginx is stopped before running the startup script. (Information on stopping, starting and restarting nginx can be found, for instance, here).

Image server connection errors

If you cannot see any images at all, be sure that you have set the correct image server path in local_settings.py. By default this will normally be localhost which is correct if you are running a local installation, but of course it will normally need to be changed for a full instance.

Clone this wiki locally