git clone --recurse-submodules https://github.com/FreeCAD/Ondsel-Server.git
cd Ondsel-ServerYou can install Ondsel-Server in two ways:
- Using docker-compose (Recommended, only requires Docker)
- Manual installation (Requires all dependencies)
- Install Docker (https://docs.docker.com/engine/install/)
- Install MongoDB (https://www.mongodb.com/docs/manual/installation/)
- Install NodeJS (https://nodejs.org/en/download)
- Install Docker (needed for FC-Worker)
This is the easiest way to run the entire application stack.
cp env.example .env
# or for using AWS S3 for storage:
cp env.with-aws.example .env# With analytics (recommended):
docker-compose --profile matomo-enabled up --build -d
# Without analytics:
docker-compose up --build -d
# Rebuild the frontend on env change:
docker-compose build --no-cache frontend
# For development:
docker-compose -f docker-compose.dev.yml --profile matomo-enabled up --build -d
# To use prebuild docker images
docker-compose -f docker-compose.prebuilds.yml --profile matomo-enabled up --build -dThat's it! The application should now be running at http://localhost:3000
- URL: http://localhost:7000
- Username: admin
- Email: [email protected]
- Password: [email protected]
- URL: http://localhost:3000
- Email: [email protected]
- Password: [email protected]
These credentials can be customized using environment variables in the .env file.
Note: For production environments, it's strongly recommended to change these default credentials using environment variables.
- Install MongoDB
- Start the MongoDB service:
systemctl start mongodb - If necessary, remove an old database:
od-backend-db, for example using MongoDB Compass
- Go to the
frontenddirectory - Rename
env.exampleto.env(Or export variables) - Install frontend dependencies
npm ci - Finally, run server
npm run dev
$ cd frontend
$ mv env.example .env
$ set -a; . ./.env; set +a
$ npm ci
$ npm run devTo run from Docker, recompile with:
sudo docker build -t frontend .and run (or re-run) with:
sudo docker run --env-file .env -p 80:80 --rm --name frontend frontend:latestIf it is required to make the server accessible on the local network, change
the environment variable below in .env and use the hostname or IP address
where the backend is available.
VITE_APP_API_URL=http://<host-or-ip-of-backend>:3030/Then run the frontend with:
npm run dev -- --host 0.0.0.0- Go to the
backenddirectory - Rename
env.exampleorenv.with-aws.example(for using AWS S3 for storage) to.env(Or export variables) - Install frontend dependencies
npm ci - Optionally, initialize the MongoDB database
npm run migration addDefaultAdminUser - Finally, run server
npm run dev
$ cd backend
$ mv env.example .env # or `mv env.with-aws.example .env` for using AWS S3 for storage
$ set -a; . ./.env; set +a
$ npm ci
$ npm run migration addDefaultAdminUserThen:
npm run devThe FC-Worker is a submodule and has its own repository.
- Go to the
FC-Workerdirectory - Build the docker image (
docker-compose build) - Run the docker image (
docker-compose up -d)
$ cd FC-Worker
$ docker-compose build
$ docker-compose up -d`Check if it works:
curl -v http://127.0.0.1:9000/2015-03-31/functions/function/invocations -X POST -H "Content-Type: application/json" -d '{"command":"<your-health-check-string>"}'