diff --git a/README.md b/README.md index 5e0dbf5..b6eb580 100644 --- a/README.md +++ b/README.md @@ -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:; -} -location /media { - alias /var/media; -} -location /static { - alias /var/static; - # Optional: don't log access to assets - access_log off; -} -location = /favicon.ico { - alias /var/static/favicon/favicon.ico; - # Optional: don't log access to the favicon - access_log off; -} -``` +That's it! ## Structure ### Overview diff --git a/config.env.example b/config.env.example index d2999ee..2bedf3c 100644 --- a/config.env.example +++ b/config.env.example @@ -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