Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
10358c1
docs: Cache option doc
taorepoara Aug 18, 2022
0fd6b26
feat: use docker-compose
taorepoara Aug 22, 2022
fec4e73
refactor: Moves the files generation in config
taorepoara Aug 24, 2022
49cbb8c
refactor: Remove olf imports
taorepoara Aug 24, 2022
3fc3629
refactor: Move docker-compose generation
taorepoara Aug 22, 2022
a913246
fix: Better
taorepoara Aug 24, 2022
d87e755
feat: Complite compose file
taorepoara Aug 24, 2022
7188154
feat: Build and start
taorepoara Aug 29, 2022
f6057e7
feat: Stop command
taorepoara Aug 29, 2022
6b5eb6f
fix: Docker ignore file path
taorepoara Aug 29, 2022
8bb7c7e
feat: Remove cache management
taorepoara Aug 30, 2022
9a9ca0e
fix: Dev is optional
taorepoara Aug 31, 2022
ae0d58c
fix: SImplification of the start command
taorepoara Sep 2, 2022
4fee2cd
docs: README
taorepoara Sep 2, 2022
a503689
feat: Invalidate cache on start
taorepoara Sep 3, 2022
1e42a08
Merge branch 'beta' into command-start
taorepoara Sep 5, 2022
b6a6fbd
Update Cargo.toml
jonas-martinez Sep 6, 2022
59da705
Update README.md
jonas-martinez Sep 6, 2022
10b4753
Update README.md
jonas-martinez Sep 6, 2022
3ea31e9
Update README.md
jonas-martinez Sep 6, 2022
13e9de0
Update README.md
jonas-martinez Sep 6, 2022
29da12e
Update README.md
jonas-martinez Sep 6, 2022
c60fe70
Update README.md
jonas-martinez Sep 6, 2022
5073914
Update README.md
jonas-martinez Sep 6, 2022
d2c3b7d
fix format
jonas-martinez Sep 6, 2022
6dbd70a
feat: Move cli elements in a mod
taorepoara Sep 7, 2022
e8f48c0
ci: Fix cargo publish
taorepoara Sep 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 138 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ name = "lenra_cli"
version = "0.0.0"
edition = "2021"
license = "MIT"
description = "THe Lenra's command line interface"
description = "The Lenra command line interface"
readme = "../README.md"
repository = "https://github.com/lenra-io/lenra_cli"
keywords = ["cli", "lenra"]
categories = ["command-line-utilities"]
include = [
"**/*.rs",
"Cargo.toml",
"README.md",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -26,3 +31,5 @@ env_logger = "0.9.0"
regex = "1.6.0"
lazy_static = "1.4.0"
dofigen = "1"
docker-compose-types = "0.2.1"
open = "1"
60 changes: 52 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@ The Lenra's command line interface.

### Prerequisites

Install the Lenra's cli using one of the next possibilities.
To build and run the Lenra elements that handle your app, the Lenra CLI needs [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/).

You can also install the [Docker buildx command](https://docs.docker.com/build/buildx/install/) to use the [Buildkit optimization given by Dofigen](https://github.com/lenra-io/dofigen).

Install the Lenra CLI using one of the next possibilities.

#### Download the binary

You can download the binary from [the release page](https://github.com/lenra-io/lenra_cli/releases) and add it to your path environment variable.

#### Cargo install

Expand All @@ -48,16 +56,15 @@ Then use the next command to install the Lenra's cli:
cargo install lenra_cli
```

#### Download the binary

You can download the binary from [the release page](https://github.com/lenra-io/lenra_cli/releases) and add it to your path environment variable.
#### Build it from sources

#### Use it with Docker
First install Cargo, the Rust package manager: https://doc.rust-lang.org/cargo/getting-started/installation.html

You can run cli directly from it Docker image with the next command:
Then clone this repository and install it with Cargo:

```bash
docker run --rm -it -v $(pwd):/app lenra/cli
git clone https://github.com/lenra-io/lenra_cli.git
cargo install --path .
```

<p align="right">(<a href="#top">back to top</a>)</p>
Expand All @@ -69,7 +76,7 @@ Use the help options to understand how to use it:
```bash
$ lenra --help
lenra_cli 0.0.0
A Dockerfile generator using a simplified description in YAML or JSON format command line tool
The Lenra command line interface

USAGE:
lenra <SUBCOMMAND>
Expand All @@ -83,6 +90,7 @@ SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
new Create a new Lenra app project
start Start your app previously built with the build command
stop Stop your app previously started with the start command
Comment thread
jonas-martinez marked this conversation as resolved.
```

### Subcommands
Expand All @@ -91,6 +99,8 @@ This tools contains many subcommands to help you doing what you need.

- [new](#new): creates a new Lenra app project
- [build](#build): builds the Lenra app of the current directory
- [start](#start): starts your app previously built with the build command
- [stop](#stop): stops your app previously started with the start command

#### new

Expand Down Expand Up @@ -136,6 +146,40 @@ OPTIONS:
-h, --help Print help information
```

#### start

This subcommand starts the Lenra app of the current directory previously built.

```bash
$ lenra start --help
lenra-start
Start your app previously built with the build command
Comment thread
jonas-martinez marked this conversation as resolved.

USAGE:
lenra start [OPTIONS]

OPTIONS:
--config <CONFIG> The app configuration file [default: lenra.yml]
-h, --help Print help information
```

#### stop

This subcommand stops the Lenra app of the current directory and removes the Docker Compose elements.

```bash
$ lenra stop --help
lenra-stop
Stop your app previously started with the start command
Comment thread
jonas-martinez marked this conversation as resolved.

USAGE:
lenra stop [OPTIONS]

OPTIONS:
--config <CONFIG> The app configuration file [default: lenra.yml]
-h, --help Print help information
```

### Configuration file

The Lenra's configuration file describes your Lenra app configurations, like API versions or how to build it.
Expand Down
Loading