feat(doc): Dégraissage du README et MaJ du config.env

This commit is contained in:
François Poulain 2020-08-03 23:13:20 +02:00
parent 8d6260d8a9
commit f7164a8dc7
2 changed files with 28 additions and 45 deletions

View File

@ -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

View File

@ -48,9 +48,12 @@
#
# Default is a SQLite database in development only.
#
# /!\ Required in production.
#DJANGO_DATABASE_URL=postgres://user:password@127.0.0.1:5432/drupal2spip_lal
#DJANGO_DATABASE_URL=mysql://user:password@127.0.0.1:3306/drupal2spip_lal
# /!\ Required in production.
#DRUPAL_DATABASE_URL=mysql://drupal:paldru@127.0.0.1:3306/drupal6
#SPIP_DATABASE_URL=mysql://spip:pisp@127.0.0.1:3306/spip
#SPIP_TABLES_PREFIX=spip
###############################################################################
# EMAILS SETTINGS
@ -84,6 +87,12 @@
# MISC SETTINGS
###############################################################################
# Where to save IMG
#SPIP_LOGO_DIR=spip_install/IMG
# Where to fetch from relative URIs
#DRUPAL_FQDN=www.april.org
# URL prefix on which the application is served.
#
# This is used to generate the static and media URLs, but also links to the