Synthesis Image Noise Detection on Distributed Data : A web app to collect data on noise detection by humans on images. https://diran.univ-littoral.fr/doc

rigwild 72cd80e1e6 Release hotfix il y a 5 ans
public 6c62d244ef init il y a 5 ans
server 72cd80e1e6 Release hotfix il y a 5 ans
src e8d1e55842 Added development environment il y a 5 ans
.dockerignore 72cd80e1e6 Release hotfix il y a 5 ans
.editorconfig 6c62d244ef init il y a 5 ans
.eslintrc.js e8d1e55842 Added development environment il y a 5 ans
.gitignore 5239a3a751 Server config + performance improvements. Better readme il y a 5 ans
LICENSE 90a7f736ab Added readme and mit license il y a 5 ans
README.md 72cd80e1e6 Release hotfix il y a 5 ans
babel.config.js 6c62d244ef init il y a 5 ans
back.Dockerfile 72cd80e1e6 Release hotfix il y a 5 ans
config.js f6d86c40dc Add of dynamic PORT use for client and back/client; Docker's separation il y a 5 ans
docker-compose.frontapp_only.yml 72cd80e1e6 Release hotfix il y a 5 ans
docker-compose.yml 72cd80e1e6 Release hotfix il y a 5 ans
front.Dockerfile 72cd80e1e6 Release hotfix il y a 5 ans
package.json 72cd80e1e6 Release hotfix il y a 5 ans
yarn.lock 5239a3a751 Server config + performance improvements. Better readme il y a 5 ans

README.md

Antoine_Internship

A web app to collect data on noise detection by humans on images.

Download project

git clone https://gogs.univ-littoral.fr/Prise3D/Antoine_Internship.git
cd Antoine_Internship

Run as a Docker instance

Configure

Use the following environment variables to configure the application. | Option | Default value | Description | Server | Client | | ----------- | ------------- | ----------- | :------: | :------: | | PORT | 5000 | The port used by the started application | ✅ | ✅ | | SERVE_CLIENT | true | Should the server serve client (Fully local application) | ✅ | ⬜️ |

Run server + client

Linux

PORT=8080 SERVE_CLIENT=true docker-compose up

Windows

SET PORT=8080
SET SERVE_CLIENT=true
docker-compose up

Run server only

Linux

PORT=8080 SERVE_CLIENT=false docker-compose up

Windows

SET PORT=8080
SET SERVE_CLIENT=false
docker-compose up

Run client only

Linux

PORT=8080 docker-compose -f docker-compose.frontapp_only.yml up

Windows

SET PORT=8080
docker-compose -f docker-compose.frontapp_only.yml up

Notice

New version Docker build

When using a new version of the project, you need to re-build the application with Docker.

# Server / Server + client versions
docker-compose build

# Client only version
docker-compose -f docker-compose.frontapp_only.yml build

Using Windows

When using Windows, it may happen that you can't properly run the containers because of Windows's path system being different. To circumvant this problem, you can do the following steps.

  1. On Command Line: "_set COMPOSE_CONVERT_WINDOWSPATHS=1";
  2. Restart Docker for Windows;
  3. Go to Docker for Windows settings > Shared Drives > Reset credentials > select drive > Apply;
  4. Reopen Command Line;
  5. Kill the Containers;
  6. Rerun the Containers.

Run on the file system

Project setup

Install project's dependencies.

yarn install

If this is a production build, set the NODE_ENV environment variable to production to enhance performance.

On Linux hosts :

export NODE_ENV=production

On Windows hosts :

SET NODE_ENV=production
SET SERVE_CLIENT=false

Configuration

Configure the project by modifying config.js.

Configuration options

Option Default value Description
apiPrefix /api The url prefix for the API
serverPort 5000 The port used by the server
imagesPath images The directory where the images are stored
serveClient true Should the server serve client files from the /dist directory

API

Run the server

yarn run server:start

Run the server with hot-reload for development

yarn run server:dev

Automatically fix the API code syntax with ESLint

yarn run server:lint

Client

Compile and minify for production

Files will be built to the dist/ directory.

yarn run app:build

Run a hot-reload server for client development

yarn run app:dev

Automatically fix the client code syntax with ESLint

yarn run app:lint

License

The MIT license