Skip to content

Lime Project env explained

lime-project env prepare

It's very simple to scaffold a development environment, as you could se in the quick guide. But what happens under the hood when you run lime-project env prepare?

The command lime-project env prepare is a wrapper command that 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). Many of those files are put in a folder called .lime in the root of your solution. We recommend you to have a look in this folder after your environment is up and running. That will help you get a better understanding of the dev 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 .lime/backups.
  • 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

Info

The files in the .lime folder is autogenerated and should therefore not be commited to your repo.

Info

If you want to change the default lime-config configuration for your environment, you can manually edit the .lime/config/config.yaml file.

Restoring a database

You can restore a database using limefu.

Put a .bak file in .lime/backups/ and run

limefu database restore -b /.lime/backups/[name].bak -a [your-project-name]

Info

Your local ./lime/backups/ is mounted as a volume to the SQL Server in /.lime/backups/