Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More

The getlino startsite command

This page is about the getlino startsite command. Used for example in Create your first Lino site and in Set up a Lino production server.

getlino startsite

Create a new Lino site on a Lino server that has previously been configured using getlino configure. Optionally reinstall an existing site or finish an interrupted installation.

Usage

Usage: getlino startsite [OPTIONS] APPNAME [PRJNAME]

Two mandatory arguments must be given unless --ini-file is specified:

  • APPNAME : The application to run on the new site. See Allowed APPNAME choices below for a list of choices.

  • PRJNAME : The nickname for the new site. We recommend lower-case only and digits but no "-" or "_". Examples: foo, foo2, mysite, first, The name must be unique for this Lino server and will become a subdirectory of the --sites-base directory specified by getlino configure.

Run-time behaviour options:

--ini-file

Existing lino.ini file to read options from.

--batch

Whether to run in batch mode, i.e. without asking any questions. Assume yes to all questions. Don't use this on a machine that is already being used.

Settings for the new site

--db-user

See Database settings. If this is empty or not specified, getlino startsite will use the server-wide default value specified by getlino configure --db-user.

--db-engine

See Database settings. If this is empty or not specified, getlino startsite will use the server-wide default value specified by getlino configure --db-engine.

--db-port

See Database settings. If this is empty or not specified, getlino startsite will use the server-wide default value specified by getlino configure --db-port.

--db-password

See Database settings. If this is empty or not specified, getlino startsite will use the server-wide default value specified by getlino configure --db-password.

--dev-repos

A space-separated list of repositories for which this site uses the development version (i.e. not the PyPI release).

Usage example:

$ getlino startsite avanti mysite --dev-repos "lino xl"

Not that the sort order is important. The following would not work:

$ getlino startsite avanti mysite --dev-repos "xl lino"
--shared-env

Full path to the shared virtualenv to use for this site. Default value is the value specified during getlino configure --shared-env If this is empty, the new site will get its own virgin environment.

Allowed APPNAME choices

>>> from atelier.sheller import Sheller
>>> shell = Sheller()
>>> shell("getlino list")  
... 
min1 : lino_book.projects.min1.settings
min2 : lino_book.projects.min2.settings
cosi4 : https://dev.lino-framework.org/projects/cosi4.html
cosi5 : https://dev.lino-framework.org/projects/cosi5.html
cosi_ee : Lino Così : Così! That's how we love accounting! A simple accounting application.
lydia : Lino Tera : A Lino for managing therapeutic centres
noi1r : https://dev.lino-framework.org/projects/noi1r.html
chatter : https://dev.lino-framework.org/projects/chatter.html
polly : https://dev.lino-framework.org/projects/polly.html
std : lino.projects.std.settings
amici : Lino Amici : Manage your family contacts
avanti : Lino Avanti : Manage the integration course of immigrants in East Belgium
cms : Lino CMS : Manage the content of your website
care : Lino Care : Manage a network of helpers.
cosi : Lino Così : Così! That's how we love accounting! A simple accounting application.
mentori : lino_mentori.lib.mentori.settings
noi : Lino Noi : Manage support tickets and working time.
presto : Lino Presto : A Lino for managing services
pronto : Lino Pronto : A Lino for assembling and selling products
tera : Lino Tera : A Lino for managing therapeutic centres
shop : Lino Shop : A Lino for managing a webshop
vilma : Lino Vilma : Manage contacts, resources and skills of a village community
voga : Lino Voga : A Lino Django application for managing courses, participants and meeting rooms
weleup : Lino Welfare Eupen : A Lino Django application for the PCSW of Eupen
welcht : Lino Welfare Châtelet : A Lino Django application for the PCSW of Châtelet

Troubleshooting

When getlino startsite was interrupted, then it gets interesting.

  • Save the console output for further reference.

  • Keep in mind that you can invoke getlino startsite with the name of an existing site in order to re-install that site.

  • If you aren't sure whether the database has been set up correctly, use the MySQL cheat sheet

  • Use the source code.

The getlino site.ini file

If your applications is not listed in the applications known by getlino or if you'd like to install/deploy django application you can define a filename.ini file (use the example template here). Where appname, prjname, git_repo and settings_module are mandatory options in the getlino section. Everything else is optional. If you are deploying a django (non-lino) you must specify use_django_settings as True.

Then run the command:

# getlino startsite --ini-file filename.ini

Tested section

>>> shell("getlino startsite --help")  
... 
Usage: getlino startsite [OPTIONS] APPNAME [PRJNAME]

  Create a new Lino site.

  Two mandatory arguments must be given unless `--ini-file` is specified:

  APPNAME : The application to run on the new site. Say `getlino list` to see
  a list of choices.

  PRJNAME : The nickname for the new site. We recommend lower-case only and
  digits but no "-" or "_". Examples:  foo, foo2, mysite, first, The name must
  be unique for this Lino server and  will become a subdirectory of the
  `--sites-base` directory specified by `getlino configure`.

Options:
  --ini-file FILENAME             Read options from an existing lino.ini file.
  --batch / --no-batch            Whether to run in batch mode, i.e. without
                                  asking any questions.  Don't use this on a
                                  machine that is already being used.
  --dev-repos TEXT                List of packages for which to install
                                  development version
  --shared-env TEXT               Directory with shared virtualenv
  --db-engine [mysql|postgresql|sqlite3]
                                  Database engine to use.
  --db-port TEXT                  Database port to use.
  --db-host TEXT                  Database host name to use.
  --db-user TEXT                  Database user name to use. Leave empty to
                                  use the project name.
  --db-password TEXT              Password for database user. Leave empty to
                                  generate a secure password.
  --help                          Show this message and exit.