- Maven 3+. See https://maven.apache.org/
- Docker
- From the base directory, build the Mongo docker image via
docker build -t xbdd_mongo_dev mongo
- Start the docker container with
docker run -p=27017:27017 --name xbdd_mongo_dev -d xbdd_mongo_dev
This will give you a docker container named xbdd_mongo_dev
which is accessible at
http://localhost:27017
- Go to https://github.com/settings/developers and register a new OAuth application
- Call the
application xbdd-{your-github-user-id}
- For the homepage url, use
http://localhost:3000
- For the redirect url, use
http://localhost:3000/login/oauth2/code/github
- In
frontend/.env.development
, addREACT_APP_GITHUB_CLIENT_ID={your-app-client-id}
. - In
backend/src/main/resources/application-dev.yml
paste in your app's client id and secret intogithub.client-id
andgithub.client-secret
respectively.
It is possible to run the dev environment using https. If you need to do so, in frontend/.env.development
set REACT_APP_BACKEND_HOST=https://localhost:8443
and add the following block,
HTTPS=true
Then you need to enable the backend server to run SSL. To do that:
- Enable the block beginning with
server
in theapplication-dev.yml
;
Finally you need to set up certificates, to do so follow the instructions for both the frontend and backend below.
- Follow the instructions in backend/src/main/resources/certs/README.md
- Import the top level into Eclipse. Ensure the nested projects import as well.
- Install Eclipse Spring Tools 4, this can be obtained through the the Eclipse Marketplace or downloaded here.
- Run
mvn clean install
in the top level directory - There is a Spring Boot Run Configuration called
Xbdd Run
that starts the backend. - In the
frontend
directory runnpm start
- Xbdd will be available at http://localhost:3000
- In the top level directory, run
mvn clean install
. - In
backend
, runmvn spring-boot:run -Dspring-boot.run.profiles=dev
- In
frontend
, runnpm start
- Ensure your mongo environment is running via
http://localhost:27017
. If not, see the earlier step. - Xbdd will be available at
http://localhost:3000
This builds the docker compose deployment without mounting the mongo db to a volume, as we require a /opt/xbdd/volumes/ to exist. The only caveat is that data will not saved between deployments, to save data the volume will need to be mounted locally. It is supposed to be used for testing changes to the deployment process.
To run do
docker-compose -f docker-compose-dev.yml build
docker-compose -f docker-compose-dev.yml -d up
To stop, docker-compose -f docker-compose-dev.yml --remove-orphans down