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
Jérôme BUISINE 17ffaaf506 Merge tag 'v0.0.2' into develop | il y a 5 ans | |
---|---|---|
public | il y a 5 ans | |
server | il y a 5 ans | |
src | il y a 5 ans | |
.dockerignore | il y a 5 ans | |
.editorconfig | il y a 5 ans | |
.eslintrc.js | il y a 5 ans | |
.gitignore | il y a 5 ans | |
LICENSE | il y a 5 ans | |
README.md | il y a 5 ans | |
babel.config.js | il y a 5 ans | |
back.Dockerfile | il y a 5 ans | |
config.js | il y a 5 ans | |
docker-compose.frontapp_only.yml | il y a 5 ans | |
docker-compose.yml | il y a 5 ans | |
front.Dockerfile | il y a 5 ans | |
package.json | il y a 5 ans | |
yarn.lock | il y a 5 ans |
A web app to collect data on noise detection by humans on images.
git clone https://gogs.univ-littoral.fr/Prise3D/Antoine_Internship.git
cd Antoine_Internship
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) | ✅ | ⬜️ |
Linux
PORT=8080 SERVE_CLIENT=true docker-compose up
Windows
SET PORT=8080
SET SERVE_CLIENT=true
docker-compose up
Linux
PORT=8080 SERVE_CLIENT=false docker-compose up
Windows
SET PORT=8080
SET SERVE_CLIENT=false
docker-compose up
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
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
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.
- On Command Line: "_set COMPOSE_CONVERT_WINDOWSPATHS=1";
- Restart Docker for Windows;
- Go to Docker for Windows settings > Shared Drives > Reset credentials > select drive > Apply;
- Reopen Command Line;
- Kill the Containers;
- Rerun the Containers.
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
Configure the project by modifying config.js.
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 |
yarn run server:start
yarn run server:dev
yarn run server:lint
Files will be built to the dist/
directory.
yarn run app:build
yarn run app:dev
yarn run app:lint