There are several options when it comes to a development environment. They are: Docker Compose, Vagrant, and manual. Choose an option below.

You can then login with any of the created users, by example:

Once the containers are up and running, run this command to populate the container with test data and create a new account

Once all the containers have started, you can access pagure on http://localhost:5000 . To stop the containers, press Ctrl+C.

To build and run the containers, use the following command:

For more information about docker-compose cli, see: https://docs.docker.com/compose/reference/ .

Docker Compose will provide you with a container which you can develop on. Install it with these instructions .

Vagrant

For a more thorough introduction to Vagrant, see https://fedoraproject.org/wiki/Vagrant.

An example Vagrantfile is provided as Vagrantfile.example . To use it, just copy it and install Vagrant. Instructions for Fedora:

$ cp dev/Vagrantfile.example Vagrantfile $ sudo dnf install ansible libvirt vagrant-libvirt vagrant-sshfs vagrant-hostmanager $ vagrant up

On Ubuntu, install Vagrant directly from the website then run these commands instead:

$ cp dev/Vagrantfile.example Vagrantfile $ sudo add-apt-repository ppa:ansible/ansible $ sudo apt update $ sudo apt install ansible libvirt0 openssh-server qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev $ vagrant plugin install vagrant-libvirt vagrant-sshfs vagrant-hostmanager

If you get this error Block in synced_folders: Internal error. Invalid: sshfs , when you run vagrant up , you need to install vagrant sshfs plugin, which can be done by:

$ vagrant plugin install vagrant--sshfs

and then:

$ vagrant up

The default Vagrantfile forwards ports from the host to the guest, so you can interact with the application as if it were running on your host machine.

Note vagrant-hostmanager will automatically maintain /etc/hosts for you so you can access the development environment from the host using its hostname, which by default is pagure-dev.example.com . You can choose not to use this functionality by simply not installing the vagrant-hostmanager plugin, but if you want Pagure to provide valid URLs in the UI for git repositories, you will need to adjust Pagure's configuration found in ~/pagure.cfg on the guest.

When the vagrant VM is up and running, connect to it with:

$ vagrant ssh

This will log you into the VM as the user vagrant which has a couple of aliases preconfigured:

$ pstart # Starts pagure, the workers and other tasks $ pstop # Stops all those tasks again $ pstatus # Shows pagure status

The Vagrant pagure doesn't have its own log file, use journalctl -f to show the pagure output. The verbosity can be configured in the pagure config file with the LOGGING parameter.