Installation¶
Caution
This project is still in an experimental state and may be unstable. Proceed at your own risk.
If you’d prefer to use Docker instead of installing it manually, see the instructions here.
Install the project¶
Note
This tutorial assumes you are using Linux and plan on
installing MangAdventure under /var/www/my-site.com/
.
The instructions are similar for Windows and MacOS.
First, you will need Python (3.8+) and pip.
Then, set up a virtualenv for MangAdventure with the following commands:
# This will install a virtualenv under /var/www/my-site.com/
python3 -m venv /var/www/my-site.com/
# This will activate the virtualenv
source /var/www/my-site.com/bin/activate
# You may need to install wheel manually
pip install wheel
Finally, install MangAdventure inside the activated virtualenv:
pip install -e "git+https://github.com/mangadventure/MangAdventure@v0.9.3#egg=mangadventure"
MangAdventure also provides the following extras:
mysql
: MySQL database supportpgsql
: PostgreSQL database supportsentry
: Sentry error reportinguwsgi
: uWSGI application server
For example, you can install csp
& uwsgi
like so:
pip install -e "git+https://github.com/mangadventure/MangAdventure@v0.9.3#egg=mangadventure[csp,uwsgi]"
Configure the settings¶
Before proceeding, there are some settings you will need to configure.
To configure them, copy the .env.example
file to .env
and edit it.
You can also override the styling of the site by writing some SCSS
(or regular CSS) in the static/extra/style.scss
file.
Create the database¶
This command will set up the database for your site.
mangadventure migrate
Collect the static files¶
This command will collect the static files into static/
.
mangadventure collectstatic
Create an administrator account¶
You will be prompted for a name, email, and password.
This account is needed to access the /admin-panel/
page.
You can create multiple administrator accounts.
mangadventure createsuperuser
Load Categories¶
If you want to load an initial set of manga categories imported from MangaUpdates, run this command:
mangadventure loaddata categories
Migrate from FoolSlide2¶
Limitations
Series will be imported without authors & artists.
Users & team members will not be imported.
Chapters with multiple teams will be imported without the teams.
Languages are not yet supported and thus cannot be imported.
This has only been tested with FoolSlide2 v2.3.3 using a MySQL database.
First, export the data from FoolSlide2:
Visit your site’s
phpMyAdmin
page.Click on your FoolSlide2 database.
Go to the
Export
tab.In
Format:
selectXML
and clickGo
.Save the generated file somewhere and copy its path.
Next, import the data into MangAdventure:
Replace
{root}
with the path to your FoolSlide2 installation.Replace
{data}
with the path to the XML file you exported.
mangadventure fs2import "{root}" "{data}"
Set up the server¶
uwsgi
has the necessary permissions to access all the relevant files.media
and log
directories
beforehand to avoid possible permission errors.uwsgi
after setting up the server:uwsgi --http-socket ":25432" --chdir "/var/www/my-site.com" --module "MangAdventure.wsgi"
Apache example¶
Apache requires mod_uwsgi.
<VirtualHost *:80>
ServerName my-site.com
ServerAlias www.my-site.com
ServerAdmin you@email.com
LimitRequestBody 51000000
Alias /static /var/www/my-site.com/src/mangadventure/static
<Directory /var/www/my-site.com/src/mangadventure/static>
Require all granted
</Directory>
Alias /media /var/www/my-site.com/src/mangadventure/media
<Directory /var/www/my-site.com/src/mangadventure/MangAdventure/media>
Require all granted
</Directory>
ProxyPass / uwsgi://127.0.0.1:25432/
</VirtualHost>
Nginx example¶
Nginx requires uwsgi.
server {
listen 80;
server_name my-site.com www.my-site.com;
charset utf-8;
client_max_body_size 51M;
location /static {
alias /var/www/my-site.com/src/mangadventure/static;
}
location /media {
alias /var/www/my-site.com/src/mangadventure/media;
}
location / {
uwsgi_pass 127.0.0.1:25432;
include uwsgi_params;
}
}
Updating¶
{tag}
with the latest release tag.)# Don't forget to activate the virtualenv
source /var/www/my-site.com/bin/activate
pip install -U -e "git+https://github.com/mangadventure/MangAdventure@{tag}#egg=MangAdventure"
Then, check .env.example
for new variables. If there are any, set them in .env
.
Finally, update the database:
mangadventure migrate