While developing locally you will need to run your project. You can install a local Lime Server and needed infrastructure, but this is quite cumbersome. An easier, faster and more lightweight solution is described here
This dev environment does not configure LDC and/or Lisa. If you want to run the desktop client or Lisa, you have to manually configure and install those services.
Setting up your environment¶
limepkg-package) created/cloned downloaded to your computer.
dockerinstalled on your machine and available in your
- A backup file of a "Lime Database"
Setting up the dev environment is very simple. All you need to do is the following:
- Open a terminal and change your working directory to the root of your
- Put a Lime CRM database backup file, ".bak", file in your projects root folder. (Important: Ensure you only have a single .bak file in the folder)
- Run the command
lime-project env prepare. This command might take quite a while the first time you run it (see more info below)
lime-project env prepare do?¶
It runs a lot of different commands, here's a brief summary about what it does:
- It scaffolds files needed for your dev environment (Executes the command
lime-project generate tool environment)
- It runs poetry install (and creates a poetry.lock file if that doesn't already exist)
- It copies the backup file from the projects root folder in to
- It sets up a docker-compose environment (It runs
docker-compose up -d)
- It restores and upgrades your Lime Database
- It creates a search index if there's not much data in your database. Otherwise it prompts and asks if you would like to index the database.
lime-project generate tool environment¶
This command is automatically executed by
lime-project env prepare. Thus you don't need to run it but here's a summary about what it does.
The following files are created when you run this command:
.env: A file with environmental variables to tell the Lime Services to use the local folder for config and static files
.lime: A folder containing config, logs, infrastructure info, application info and static files
.lime/config/config.yaml: An environmental config file
.vscode/launch.json- A VSCode launch config file
The files in the
.lime folder is autogenerated and should therefore not be commited to your repo.
If you want to change the default lime-config configuration for your environment, you can manually edit the
Restoring a database¶
You can restore a database using
.bak file in
.lime/backups/ and run
$ limefu database restore -b /.lime/backups/[name].bak -a [your-project-name]
./lime/backups/ is mounted as a volume to the SQL Server in
Starting the services and debugging¶
Open your solution in VS Code. You can now launch and debug any of the services via VSCode.
- Activate your python venv (run
- Run the service you want to run, for instance the webserver (
flask run) or the eventhandler (