aboutsummaryrefslogtreecommitdiffstats
path: root/README.rst
blob: 1a99a0ad7860ee79f1ed3fd4e13724bb09cf1222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
**********************
README for APK Vitrine
**********************

a package tracker and analyzer for APK repositories

:Authors:
  **Max Rees**, maintainer
:Status:
  Beta
:Releases and source code:
  `Adélie Linux Gitlab <https://git.adelielinux.org/sroracle/apkvitrine>`_
:Copyright:
  © 2020-2021 Max Rees. NCSA open source license.

Dependencies
------------

* Python 3.6+
* `Jinja2 <https://pypi.org/project/Jinja2/>`_ >= 2.10.3 (web
  application dependency)
* `Flup <https://pypi.org/project/flup/>`_ >= 1.0.3 (web application
  dependency)
* `APK Kit <https://pypi.org/project/apkkit/>`_ >= 6.0.6.1 (database
  builder dependency)
* libapk (database builder dependency)

Running the web application
---------------------------

Thanks to Flup, the web application can be run as either a traditional
CGI program, or using FastCGI. Here's an example Lighttpd configuration
for traditional CGI usage under the URL ``/pkg``::

    $HTTP["url"] =~ "^/pkg(/|$)" {
      alias.url += (
          "/pkg/static" => "/usr/share/webapps/apkvitrine/static",
          "/pkg" => "/usr/share/webapps/apkvitrine/apkvitrine.cgi",
      )

      cgi.assign = ("apkvitrine.cgi" => "")
    }

Here's FastCGI::

    var.apkvitrine_dir = "/usr/share/webapps/apkvitrine/"
    $HTTP["url"] =~ "^/pkg(/|$)" {
      alias.url += (
          "/pkg/static" => var.apkvitrine_dir + "static",
          "/pkg" => var.apkvitrine_dir + "apkvitrine.cgi",
      )

      fastcgi.server += ( "apkvitrine.cgi" => ( "apkvitrine" => (
          "docroot" => var.apkvitrine_dir,
          # Replace var.run_dir with wherever lighttpd can make a
          # socket.
          "socket" => var.run_dir + "apkvitrine.sock",
          "bin-path" => var.apkvitrine_dir + "apkvitrine.cgi",
          # Tune to your requirements.
          "max-procs" => 5,
      ) ) )
    }