Skip to content
Snippets Groups Projects
Commit ef05b682 authored by CARRON Guilhem's avatar CARRON Guilhem
Browse files

Some improvements + fixed wrong link

parent 94a91ec4
No related branches found
No related tags found
No related merge requests found
!!! info ""
:construction: Section under Construction :construction:
:construction: Section under Construction :construction:
This section will allow you to launch a proper local environment of the Ecolyo application
......@@ -8,6 +8,7 @@ This section will allow you to launch a proper local environment of the Ecolyo a
### Clone the project repository
Use following command in your favorite terminal to clone the projet:
```
git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git
```
......@@ -15,6 +16,7 @@ git clone https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git
### User settings
Open the project with VSCode and add the following code into .vscode/settings.json:
```
{
"workbench.colorCustomizations": {
......@@ -36,11 +38,25 @@ Open the project with VSCode and add the following code into .vscode/settings.js
}
```
If this file is not empty, you can simply add the follwing lines to it:
```
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"breadcrumbs.enabled": true,
"workbench.settings.editor": "json",
"editor.formatOnSave": true,
"diffEditor.ignoreTrimWhitespace": false,
"window.zoomLevel": 0,
```
## Installation of the projet
### Installation of node modules
To install required node module, open a terminal on the root folder of the projet and type the following command:
```
yarn
```
......@@ -48,15 +64,18 @@ yarn
### Start Ecolyo application
To start ecolyo application just launch the command:
```
yarn start
```
If application start successfully you should obtain following message:
> App successfully updated!<br>
> Dev assets: http://localhost:8888
!!! info "Fix webpack error on cozy script"
During launching you may have the following error: ** TO BE COMPLETED **
During launching you may have the following error: ** TO BE COMPLETED **
To fix it launch the following command in node_modules/cozy-script folder:
```
......@@ -68,19 +87,23 @@ If application start successfully you should obtain following message:
The dev stack will contain the cozy-stack with some default applications and konnectors and allow you to run this stack localy.
First login to the forge registry:
```
docker login registry.forge.grandlyon.com
```
You will need to enter for credentials.
Next pull the last image of the dev stack:
```
docker pull registry.forge.grandlyon.com/web-et-numerique/llle/cozy-env:latest
docker pull registry.forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/cozy-env:latest
```
#### On windows
Launch the stack will following command:
```
yarn winstack
```
......@@ -94,6 +117,7 @@ Local database can also be consulted at the following url: [Cozy local DB](http:
#### On Linux
From the project build folder, launch following command:
```
docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $(pwd):/data/cozy-app -v ~/cozy/data/db:/usr/local/couchdb/data -v ~/cozy/data/storage:/data/cozy-storage --name=cozydev cozy/cozy-app-dev
```
......@@ -101,26 +125,29 @@ docker run --rm -it -p 8080:8080 -p 5984:5984 -p 8025:8025 -v $(pwd):/data/cozy-
Wait until the success message:
**TO BE COMPLETED**
Once successfull you can launch your local cozy with following url: [Cozy local url](http://cozy.tools:8080/)
Once successfull you can launch your local cozy with following url [Cozy local url](http://cozy.tools:8080/) and connect with the password '**cozy**'.
Local database can also be consulted at the following url: [Cozy local DB](http://localhost:5984/_utils/)
## Import moke data
!!! info "Requirement"
Your dev stack should be running to import the moke data
Your dev stack should be running to import the moke data
First install ACH using yarn :
First install ACH using yarn :
```
yarn global add cozy-ach
```
Next launch the script **createDayDataFiles.js** available into **test** folder
```
cd test
node createDayDataFiles.js
```
!!! info ""
You can change the period of data generated by changing the following lines:
You can change the period of data generated by changing the following lines:
```
const startingdate = DateTime.local()
......@@ -135,10 +162,15 @@ node createDayDataFiles.js
Json files with data will be created into **test/data** folder.
ACH script "importData.bat" will load the content of the file into your couchDB (database of your dev stack). Launch it using following commands:
```
cd test
./importData.bat
```
!!! info ""
You'll be prompted for a cozysessid, you can get it in the web console ; in the 'application' tab, look for the cookies and just copy the cozysessid value.
A new browser windows will open and asking you approval to import data. Just click on **Approve**
Finally your data is loaded and ready to be displayed in the Ecolyo Application !
\ No newline at end of file
Finally your data is loaded and ready to be displayed in the Ecolyo Application !
......@@ -4,7 +4,7 @@ This section will allow you to install a proper local environment step by step f
### Install VSCode
Installation for VSCode can be found here: [Installaltion of VSCode](https://code.visualstudio.com/).
Installation for VSCode can be found here: [Installation of VSCode](https://code.visualstudio.com/).
### Extensions
......@@ -12,18 +12,18 @@ Installation of Extention is explained here: [Installation of Extensions](https:
Here are the list of important extensions to install:
* Prettier - Code formatter
* ES7 React/Redux/GraphQL/React-Native snippets
* GitLens - Git supercharged
* Markdown Preview
- Prettier - Code formatter
- ES7 React/Redux/GraphQL/React-Native snippets
- GitLens - Git supercharged
- Markdown Preview
Optional extensions:
* Bracket Pair Colorizer 2
* CSS Peek
* Auto Rename Tag
* indent-rainbow
* TabOut
- Bracket Pair Colorizer 2
- CSS Peek
- Auto Rename Tag
- indent-rainbow
- TabOut
### User settings
......@@ -34,8 +34,7 @@ User settings for Ecolyo are describ in this section: **LINK TO SECTION TO ADD**
The project is using GitLab, you will need to install Git to checkout the projet.
Installation for Git can be found here: [Installation of Git](https://git-scm.com/).
## Yarn
## Yarn
Yarn is used as package manager for this projet. Feel free to use the one you prefere but we advice to install yarn as all the documentation is describe with this package manager.
Installation for yarn can be found here: [Installation of Yarn](https://classic.yarnpkg.com/fr/docs/install/).
......@@ -51,4 +50,3 @@ Installation of Docker can be found here: [Installation of Docker](https://www.d
### Install Docker-Compose
Installation of Docker-Compose (according to your OS) is explained here: [Installation of Docker-Compose](https://docs.docker.com/compose/install/).
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