# Build and start
This works mostly the same as our earlier build.
Make sure that Docker Desktop is started.
Open Terminal in:
<GITDIR>\senseeact\ExampleSenSeeActService
Make sure that you have the correct version of gradle.properties.
Enter this command:
> .\gradlew webBuild dockerDevBuild dockerDevStart
There are three Gradle tasks for Docker that you can use:
dockerDevBuild
:
Builds the Docker imagessenseeacttomcat
andsenseeactweb:dev
.dockerDevStart
:
Creates and starts the Docker containers, usingdocker compose up -d
.dockerStop
:
Stops and removes the Docker containers, usingdocker compose down
.
When you have started SenSeeAct, you can access the same URLs as the earlier build.
# Web application
A difference with our earlier deployment is that we are using the Docker image
senseeactweb:dev
instead of senseeactweb:latest
. This way you can edit the
web application files (HTML, CSS, JavaScript), quickly build them and then
refresh your browser to see the changes without the need to restart SenSeeAct
completely.
The source files are in this directory:
<GITDIR>\senseeact\SenSeeActService\src\main\web
You can create the same directory in your service implementation, in our case
the example service:
<GITDIR>\senseeact\ExampleSenSeeActService\src\main\web
The Gradle task webBuild
copies the files (and builds Handlebars templates)
from these two directories to this build directory:
<GITDIR>\senseeact\ExampleSenSeeActService\build\web-src
The directories are copied in the given order. This allows you to create files
in the second directory that overwrite files from the first directory. The build
directory is eventually served by senseeactweb:dev
.
So after making a change, you need to build the files first.
Open Terminal in:
<GITDIR>\senseeact\ExampleSenSeeActService
Enter this command:
> .\gradlew webBuild
Then you can refresh your browser.