@@ -20,15 +20,23 @@ This project is split between a backend and frontend, each project has its own r
- `IMAGE_FOLDER`: this variable specify the folder where ecogestures images are located. By default, you can place this folder at the same level as your project for a local usage. (not inside the project). For alpha, rec/prod environment, make sure the path indicated in docker-compose volumes correspond with the location of the image file on the server.
- `MOCK_OAUTH2`: Set this variable to true while in local, so the OAuth2 dance will be mocked by backend and you will be able to login to your application.
- `USERINFO_URL`: Set this variable to `http://localhost:8090/admininfo` to log in with admin role or to `http://localhost:8090/animatorinfo` to log in with animator role
- `USERINFO_URL`: Set this variable to configure the user role
- `http://localhost:8090/admininfo` to log in with admin role
- `http://localhost:8090/animatorinfo` to log in with animator role
In order to launch the project in local with the backend working launch the following command
First, build the server image with :
```sh
docker build .-t backoffice-server
```
You can then launch the client with :
```bash
yarn local-up
```
This command will launch the app from the _docker-compose.local.yml_ file, which will launch 4 images and start the react app with _yarn start_
This command will launch the app from the `docker-compose.local.yml`` file, which will launch 4 images and start the react app with _yarn start_
- The backend Go app, from the image located on its Gitlab repository
- A mySQL database, from the DockerHub image
...
...
@@ -90,7 +98,7 @@ This backend should be deployed with the frontend using [local command](#local-u
However this backend can be run in standalone :
- Set a .env file at the root and add all variables declared in the template.env
- (Optionnal) Create new certificates by running cd dev_certificates && ./generate-certificates.sh
- (Optional) Create new certificates by running cd dev_certificates && ./generate-certificates.sh
- Run `docker-compose up -d`
Once deployed, you can access to a Swagger documentation of the API on <https://${HOSTNAME}/swagger/index.html>
...
...
@@ -105,7 +113,3 @@ In local you can access phpmyadmin interface to manage the database : <http://lo
Launch the server by pressing F5 on vscode, you will see the logs on the debug console.
All API routes are available on <https://localhost:1443>