|
|
|
@ -19,15 +19,26 @@ $ sudo apt install python3 virtualenv git make
|
|
|
|
|
$ git clone https://forge.april.org/siteweb/drupal2spip_lal
|
|
|
|
|
$ cd drupal2spip_lal/
|
|
|
|
|
$ make init
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
A configuration will be created interactively; uncomment
|
|
|
|
|
```
|
|
|
|
|
ENV=development
|
|
|
|
|
|
|
|
|
|
$ make test # optional
|
|
|
|
|
$ make serve
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Then visit [http://127.0.0.1:8000/](http://127.0.0.1:8000/) in your web browser.
|
|
|
|
|
And set:
|
|
|
|
|
|
|
|
|
|
- DRUPAL_FQDN
|
|
|
|
|
- DRUPAL_DATABASE_URL
|
|
|
|
|
- SPIP_DATABASE_URL
|
|
|
|
|
- SPIP_TABLES_PREFIX
|
|
|
|
|
- SPIP_LOGO_DIR
|
|
|
|
|
|
|
|
|
|
Then try:
|
|
|
|
|
```
|
|
|
|
|
$ make inspectdb
|
|
|
|
|
$ make check
|
|
|
|
|
$ venv/bin/python manage.py import --help
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
### Requirements
|
|
|
|
@ -97,44 +108,7 @@ extracted it and that you moved to that folder.
|
|
|
|
|
|
|
|
|
|
$ ./manage.py migrate
|
|
|
|
|
|
|
|
|
|
That's it! You should now be able to start the Django development server to
|
|
|
|
|
check that everything is working fine with:
|
|
|
|
|
|
|
|
|
|
$ ./manage.py runserver
|
|
|
|
|
|
|
|
|
|
## Deployment
|
|
|
|
|
|
|
|
|
|
Here is an example deployment using NGINX - as the Web server - and uWSGI - as
|
|
|
|
|
the application server.
|
|
|
|
|
|
|
|
|
|
The uWSGI configuration doesn't require a special configuration, except that we
|
|
|
|
|
are using Python 3 and a virtual environment. Note that if you serve the
|
|
|
|
|
application on a sub-location, you will have to add `route-run = fixpathinfo:`
|
|
|
|
|
to your uWSGI configuration (from
|
|
|
|
|
[v2.0.11](https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.11.html#fixpathinfo-routing-action)).
|
|
|
|
|
|
|
|
|
|
In the `server` block of your NGINX configuration, add the following blocks and
|
|
|
|
|
set the path to your application instance and to the uWSGI socket:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
location / {
|
|
|
|
|
include uwsgi_params;
|
|
|
|
|
uwsgi_pass unix:<uwsgi_socket_path>;
|
|
|
|
|
}
|
|
|
|
|
location /media {
|
|
|
|
|
alias <app_instance_path>/var/media;
|
|
|
|
|
}
|
|
|
|
|
location /static {
|
|
|
|
|
alias <app_instance_path>/var/static;
|
|
|
|
|
# Optional: don't log access to assets
|
|
|
|
|
access_log off;
|
|
|
|
|
}
|
|
|
|
|
location = /favicon.ico {
|
|
|
|
|
alias <app_instance_path>/var/static/favicon/favicon.ico;
|
|
|
|
|
# Optional: don't log access to the favicon
|
|
|
|
|
access_log off;
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
That's it!
|
|
|
|
|
|
|
|
|
|
## Structure
|
|
|
|
|
### Overview
|
|
|
|
|