First, you need to get the code:
git clone https://github.com/CatalystCode/project-fortis.git
cd project-fortis
Then, you need to set up some services in Azure by running the following Bash script (e.g. via the Windows Subsystem for Linux):
./project-fortis-pipeline/localdeploy/setup-development-azure-resources.sh \
-i YOUR_SUBSCRIPTION_ID_HERE \
-l YOUR_CLOSEST_AZURE_LOCATION_HERE \
-o .env-secrets
This script will deploy to Azure a number of services used by Fortis, such as
ServiceBus, EventHubs, Cognitive Services, PostgreSQL, and so forth. The secrets
to access these services are stored in a .env-secrets
file which the rest of
the development setup will leverage. All the services are stored inside of a
single resource group whose name is stored under the
FORTIS_RESOURCE_GROUP_NAME
key in the secrets file.
Mapbox is a service that allows you to simply create beautiful maps and location services through APIs and SDKs. They have extensive documentation which you can find here.
Next, you need to create a Mapbox access token. If you don't have one yet, you
can create a new one for free by signing up.
Once you have the token, append it to the .env-secrets
file like so:
MAPBOX_ACCESS_TOKEN=your_mapbox_access_token_here
You may also want to add your email address to the USERS
or ADMINS
list in
the .env
file; otherwise you wouldn't be able to log into your Fortis site!
Alternatively, you can also clear out the value for the key AD_CLIENT_ID
in
the .env
file in order to disable authentication entirely. This is for example
useful if you want to talk directly to the GraphQL server via the GraphiQL tool
instead of accessing the API endpoints via the UI.
This project runs entirely inside of Docker containers orchestrated by docker-compose, so please ensure that you have installed Docker on your system, e.g. Docker for Windows.
We're using a volume mount to enable support for code hot-reload. As such, please ensure that you've shared the drive on which your code resides with Docker via the "Shared Drives" tab in the Docker settings.
The containers created for this project use quite a lot of resources, so if any of the services die with exit code 137, please give more memory to Docker via the "Advanced" tab in the Docker settings.
Now you can start the full Fortis pipeline with one command:
docker-compose up --build
This will start all the Docker services and gather logs in the terminal. Note that the first time you run this command, it will take upwards of 90 minutes to start since your personal feature service database is getting populated.
After all the Docker services started, head over to the following URLs to play with the services:
- Frontend
- Backend
- Spark
- Feature service:
After making changes, you can re-build and re-start the affected services using:
docker-compose up --build -d
Note that any changes to the React code in project-fortis-interfaces folder will be automatically detected and re-loaded so the re-build step above won't be necessary for changes to the frontend.
If you're facing any issues, refer to the Development FAQ.