Skip to content
Snippets Groups Projects
Commit 13c1cc95 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Update commands.md

parent 8de1b366
No related branches found
No related tags found
No related merge requests found
Pipeline #44772 passed
### :computer: Commands
# :computer: Commands
This section includes all common commands used on dev environment.
This section includes all common commands used on dev environment. These commands should be runned in `easy-cozy` directory.
```sh
cd easy-cozy
```
### App
## App
#### Install a specific version of an app
### Install a specific version of an app
```bash
$ cd /easy-cozy
$ docker-compose exec cozy ./cozy apps update home --domain "[name].cozy.self-data.alpha.grandlyon.com" git://github.com/doubleface/cozy-collect.git#build-debug
docker-compose exec cozy ./cozy apps update home --domain "[name].cozy.self-data.alpha.grandlyon.com" git://github.com/doubleface/cozy-collect.git#build-debug
```
### Konnector
## Konnector
#### Install a specific version of a konnector
### Install a specific version of a konnector
```bash
$ cd /easy-cozy
# cozy-stack konnectors uninstall ${konn} --domain ${url}
$ docker-compose exec cozy ./cozy konnectors uninstall grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
docker-compose exec cozy ./cozy konnectors uninstall grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
grdfgrandlyon has been uninstalled
# cozy-stack konnectors install ${konn} --domain ${url}
$ docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com" git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-adict-konnector.git#build
docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com" git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-adict-konnector.git#build
grdfgrandlyon (0.1.5) has been installed on [name].cozy.self-data.alpha.grandlyon.com
```
#### Update the version of a konnector
### Update the version of a konnector
```bash
$ cd /easy-cozy
......@@ -33,42 +34,38 @@ $ cd /easy-cozy
$ docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
grdfgrandlyon has been upgraded to 0.1.5-d4bbe7350ecf13d13734f559c538e3c0ee8dc7ae
```
#### Run a konnector from the stack
### Run a konnector from the stack
```bash
$ cd /root/easy-cozy
# cozy-stack konnectors run ${konn} --domain ${url}
$ docker-compose exec cozy ./cozy konnectors run grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
docker-compose exec cozy ./cozy konnectors run grdfgrandlyon --domain "[name].cozy.self-data.alpha.grandlyon.com"
```
### Instance
## Instance
#### Set log level to debug for an instance
### Set log level to debug for an instance
```bash
$ cd /root/easy-cozy
# cozy-stack instances debug ${url} true
$ docker-compose exec cozy ./cozy instances debug --domain "[name].cozy.self-data.alpha.grandlyon.com" true
docker-compose exec cozy ./cozy instances debug --domain "[name].cozy.self-data.alpha.grandlyon.com" true
```
#### List all instances
```bash
$ cd /root/easy-cozy
# cozy-stack instances ls
$ docker-compose exec cozy ./cozy instances ls
docker-compose exec cozy ./cozy instances ls
```
### Stack
## Stack
#### Check stack version
### Check stack version
```bash
$ cd /easy-cozy
$ docker-compose exec cozy ./cozy version
docker-compose exec cozy ./cozy version
```
#### Update stack version
### Update stack version
Update version in the Dockerfile on gitlab.
......@@ -94,3 +91,12 @@ Update version in the Dockerfile on gitlab.
> ./cozy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./cozy)
We have replaced debian:stable-slim with ubuntu:20.10 as installer for our docker build: [https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167](https://forge.grandlyon.com/pocs/cozy/easy-cozy/-/commit/48a30a03f209169e0f1ebb0d106bb4361e7cd167)
### Manipulate data
To read/write data from the stack you can run the following commands
```sh
docker-compose exec db curl -u [USER]:[PASSWORD] -X [METHOD] http://127.0.0.1:5984/[DATABASE]
```
:warning: When updating a document, make sure to remove the `_id` and to add `_rev` fields
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment