ref(doc): épure le readme
This commit is contained in:
parent
863f885100
commit
cb563ffca5
96
README.md
96
README.md
@ -4,13 +4,25 @@ Convertisseur Drupal 6 vers SPIP pour le site web libre à lire
|
||||
|
||||
**Table of content**
|
||||
|
||||
- [Give a try](#give-a-try)
|
||||
- [Installation](#installation)
|
||||
- [Deployment](#deployment)
|
||||
- [Usage](#usage)
|
||||
- [Structure](#structure)
|
||||
- [Development](#development)
|
||||
|
||||
## Give a try
|
||||
## Installation
|
||||
|
||||
### Requirements
|
||||
|
||||
On a Debian-based host - running at least Debian Stretch, you will need the
|
||||
following packages:
|
||||
- python3
|
||||
- virtualenv
|
||||
- make
|
||||
- git (recommended for getting the source)
|
||||
- python3-mysqldb (optional, in case of a MySQL / MariaDB database)
|
||||
- python3-psycopg2 (optional, in case of a PostgreSQL database)
|
||||
|
||||
### Let's go
|
||||
|
||||
On a Debian-based host - running at least Debian Stretch:
|
||||
|
||||
@ -37,76 +49,14 @@ Then try:
|
||||
```
|
||||
$ make inspectdb
|
||||
$ make check
|
||||
$ venv/bin/python manage.py import --help
|
||||
```
|
||||
|
||||
## Installation
|
||||
### Requirements
|
||||
## Usage
|
||||
|
||||
On a Debian-based host - running at least Debian Stretch, you will need the
|
||||
following packages:
|
||||
- python3
|
||||
- virtualenv
|
||||
- make
|
||||
- git (recommended for getting the source)
|
||||
- python3-mysqldb (optional, in case of a MySQL / MariaDB database)
|
||||
- python3-psycopg2 (optional, in case of a PostgreSQL database)
|
||||
|
||||
### Quick start
|
||||
|
||||
It assumes that you already have the application source code locally - the best
|
||||
way is by cloning this repository - and that you are in this folder.
|
||||
|
||||
1. Define your local configuration in a file named `config.env`, which can be
|
||||
copied from `config.env.example` and edited to suits your needs.
|
||||
|
||||
Depending on your environment, you will have to create your database and the
|
||||
user at first.
|
||||
|
||||
2. Run `make init`.
|
||||
|
||||
Note that if there is no `config.env` file, it will be created interactively.
|
||||
|
||||
That's it! Your environment is now initialized with the application installed.
|
||||
To update it, once the source code is checked out, simply run `make update`.
|
||||
|
||||
You can also check that your application is well configured by running
|
||||
`make check`.
|
||||
|
||||
### Manual installation
|
||||
|
||||
If you don't want to use the `Makefile` facilities, here is what is done behind the scene.
|
||||
|
||||
It assumes that you have downloaded the last release of drupal2spip_lal,
|
||||
extracted it and that you moved to that folder.
|
||||
|
||||
1. Start by creating a new virtual environment under `./venv` and activate it:
|
||||
|
||||
$ virtualenv --system-site-packages ./venv
|
||||
$ source ./venv/bin/activate
|
||||
|
||||
2. Install the required Python packages depending on your environment:
|
||||
|
||||
$ pip install -r requirements/production.txt
|
||||
... or ...
|
||||
$ pip install -r requirements/development.txt
|
||||
|
||||
3. Configure the application by setting the proper environment variables
|
||||
depending on your environment. You can use the `config.env.example` which
|
||||
give you the main variables with example values.
|
||||
|
||||
$ cp config.env.example config.env
|
||||
$ nano config.env
|
||||
$ chmod go-rwx config.env
|
||||
|
||||
Note that this `./config.env` file will be loaded by default when the
|
||||
application starts. If you don't want that, just move this file away or set
|
||||
the `READ_CONFIG_FILE` environment variable to `0`.
|
||||
|
||||
4. Create the database tables - it assumes that you have created the database
|
||||
and set the proper configuration to use it:
|
||||
|
||||
$ ./manage.py migrate
|
||||
See:
|
||||
```
|
||||
$ venv/bin/python manage.py import --help
|
||||
```
|
||||
|
||||
That's it!
|
||||
|
||||
@ -120,9 +70,7 @@ Two environments are defined - either for requirements and settings:
|
||||
- `development`: for local application development and testing. It uses a
|
||||
SQLite3 database and enable debugging by default, add some useful settings
|
||||
and applications for development purpose - i.e. the `django-debug-toolbar`.
|
||||
- `production`: for production. It checks that configuration is set and
|
||||
correct, try to optimize performances and enforce some settings - i.e. HTTPS
|
||||
related ones.
|
||||
- `production`: for production. Unused here.
|
||||
|
||||
### Local changes
|
||||
|
||||
@ -157,8 +105,6 @@ There is some additional rules when developing, which are mainly wrappers for
|
||||
- `make test`: test the whole application
|
||||
- `make lint`: check the Python code syntax
|
||||
|
||||
|
||||
|
||||
## License
|
||||
|
||||
drupal2spip_lal is developed by François Poulain (April) and licensed under the
|
||||
|
Loading…
Reference in New Issue
Block a user