Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | 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. Rungetlino list
to get a list of available 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 bygetlino 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 bygetlino 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 bygetlino 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 bygetlino 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"
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.
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¶
>>> from atelier.sheller import Sheller
>>> shell = Sheller()
>>> 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.