Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
APK Vitrine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Max Rees
APK Vitrine
Commits
bae2fe1d
Commit
bae2fe1d
authored
Dec 28, 2020
by
Max Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add FastCGI support using flup
parent
24683c92
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
274 additions
and
189 deletions
+274
-189
README.rst
README.rst
+37
-1
apkvitrine/cgi.py
apkvitrine/cgi.py
+218
-188
config.ini.in
config.ini.in
+19
-0
No files found.
README.rst
View file @
bae2fe1d
...
...
@@ -17,8 +17,44 @@ Dependencies
------------
* Python 3.6+
* `Jinja2 <https://pypi.org/project/Jinja2/>`_ >= 2.10.3 (CGI frontend
* `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/style.css" => "/path/to/apkvitrine/style.css",
"/pkg" => "/path/to/apkvitrine/cgi.py",
)
cgi.assign = (".py" => "/path/to/apkvitrine/cgi.py")
}
Here's FastCGI::
$HTTP["url"] =~ "^/pkg(/|$)" {
alias.url += (
"/pkg/style.css" => "/path/to/apkvitrine/style.css",
"/pkg" => "/path/to/apkvitrine/cgi.py",
)
fastcgi.server += ( ".py" => ( "apkvitrine" => (
# Replace var.run_dir with wherever lighttpd can make a
# socket.
"socket" => var.run_dir + "apkvitrine.sock",
"bin-path" => "/path/to/apkvitrine/cgi.py",
# Tune to your requirements.
"max-procs" => 5,
) ) )
}
apkvitrine/cgi.py
View file @
bae2fe1d
This diff is collapsed.
Click to expand it.
config.ini.in
View file @
bae2fe1d
...
...
@@ -15,6 +15,25 @@ repos = system aarch64 ppc ppc64 pmmx x86_64
; Substitutions: {revision}
gl_rev_url = https://code.foxkit.us/adelie/packages/-/commit/{revision}
; Required: data directory
; This is the directory in which the web application looks for the SQL
; database files.
;
; This option should only be specified in the @default section.
data_dir = /var/db/apkvitrine
; Optional: enable static HTML caching
; Each page that the web application believes to be static (for the
; lifetime of the SQL database) will be cached underneath this
; directory. Combined with FastCGI, this makes loading latencies very
; low. It should be manually emptied after the SQL database is updated.
;
; This directory should already exist, or be creatable by the user under
; which the web application runs.
;
; This option should only be specified in the @default section.
;cache_dir = /var/tmp/apkvitrine
; *********************
; * Bugzilla settings *
; *********************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment