Skip to main content

SciForge: Starting and Stopping Development

In training modules to this point, we have covered the setup of the development environment to include:

  • Cloned all necessary code
  • Setup DNS addresses for Traefik and for the Sciforge development environment
  • Setup Traefik to reverse proxy the development API
  • Setup the .env configuration file for your development environment

With this all correctly configured, it is time to start the API.

Video: Starting and Stopping Development

Starting

From the root of the sciforge repository, run:

sudo ./sciforge-stack-cmd.sh up

 

It can take a moment or two to start, and get the web cert the first time. You can monitor the progress docker logs (container logs or service logs):

sudo docker ps
#find container ID or name from list
sudo docker logs <container>
#Alternatively
sudo docker service ls
#find service ID or name from list
sudo docker service logs <service>

Your API should now be accessible at the URL you configured. For example if your “CLIENTCODE” value is “train”, and configuration was left in the sciforge.net domain, then open a web browser to your GraphQL sandbox:

https://train.sciforge.net/graphql (example only, link does not work)

You should reach a site that looks like the below. The GraphQL sandbox will allow you to discover, via the docs, the various mutations and queries available, as well as the underlying types that match the database schema.

image-20240919-214255.png

All the changes made to the underlying code will be reflected immediately after saving in the IDE.

Adjust Setting

There are some authentication modes that utilize cookies to persist session information about a user. Many use cases will not utilize these modes. However, for these to work in the sandbox, there is a default setting that must be adjusted.

Click the gearbox in the upper right. This will open a variety of text-based settings.

The setting labeled "request.credentials" defaults to “omit.” Change this to "include."

Documentation

See the left hand pane for information about resolvers and the underlying types and objects.

Stopping

Run the below command from the root of the sciforge repository:

sudo ./sciforge-stack-cmd.sh down