6a37cd9cc4 | ||
---|---|---|
templates | ||
test | ||
.gitignore | ||
AdvSearchPage.py | ||
BaseFormatter.py | ||
BaseSearcher.py | ||
BibrecPage.py | ||
CherryPy.conf | ||
CherryPyApp.py | ||
CloudStorage.py | ||
ConnectionPool.py | ||
CoverPages.py | ||
Dropbox.py | ||
DublinCoreI18n.py | ||
Formatters.py | ||
GDrive.py | ||
HTMLFormatter.py | ||
Icons.py | ||
JSONFormatter.py | ||
LICENSE | ||
MSDrive.py | ||
OPDSFormatter.py | ||
Page.py | ||
Pipfile | ||
Pipfile.lock | ||
QRCodePage.py | ||
README.md | ||
SearchPage.py | ||
Sitemap.py | ||
StartPage.py | ||
SuggestionsPage.py | ||
SupportedLocales.py | ||
TemplatedPage.py | ||
Test.py | ||
Timer.py | ||
UserAgents.py | ||
__init__.py | ||
autocat3.service | ||
configuring.txt | ||
diagnostics.py | ||
errors.py | ||
i18n_tool.py | ||
test.conf |
README.md
autocat3_original
Introduction
autocat3 is a python-based application used for supporting Project Gutenberg. CherryPy is used as the web framwork which is easy to develop. If mainly implemented the search functionality and rate limiter. Also return results pages based on templates.
How it works.
Currently, the dev environment and production environment share the same server login1. The production version of autocat3 is on gutenberg2. This application in this repository is on gutenberg1.
Previously, the old version of autocat3 relies on dependencies installed directly on the system. To make it more flexible and easy to deploy, we tend to use virtual env rather than the previous method. To use virtual env, we use pipenv instead of using pip and virtual env separately.
The virtual env directory is on the default directory while we run pipenv --three
. So it's not in this directory. (we are only using python3 for this project because CherryPy will discard the python2 in the future).
To start the service/application, we use systemd to do that. the autocat3.service
file is written under /etc/systemd/system
directory.
To start:
- make sure
sudo systemctl daemon-reload
everytime we edit the systemd unit file sudo systemctl start autocat3.service
to start servicesudo systemctl stop autocat3.service
to stop servicesudo systemctl status autocat3.service
to check the running status of the service
How to install
Currently, we use the following steps to deploy autocat3 on a different server.
- Create Virtual env:
pipenv --three
to create a virtual env for current working directory(current project) - Install packages/python modules:
pipenv install
to install all the packages in the Pipfile. If there is a requirements.txt file output frompip freeze
, the command will automatically add the package names into Pipfile and install the packages and keep them in the Popfile for later use. - lock the packages:
pipenv lock
to be used to produce deterministic builds. - Check the virtual env path:
pipenv --venv
- Start virtual env:
pipenv shell
Copyright 2009-2010 by Marcello Perathoner