-
Notifications
You must be signed in to change notification settings - Fork 1
Docker and Docker Compose
Dave Walker edited this page Aug 19, 2024
·
6 revisions
The Drone FlightLog API and UI are available as Docker container images. Please see the following Docker Hub repositories for more information:
To run the Drone Flight Log UI and the associated Web Service in Docker:
- Create a folder to contain the database and Docker Compose file
- Create a database in that folder using the instructions in the "Database" section
- Create a user in the database using the instructions in the "Database" section
When completed, the folder structure should look as follows:
- The following is an example Docker Compose file that can be used to run the Drone Flight Log service and UI from the published Docker images
- It should be saved as "docker-compose.yml" in the folder containing the database
version: "3.7"
services:
drone-ui:
container_name: droneflightlogmvc
image: davewalker5/droneflightlogmvc:latest
restart: always
ports:
- "8082:80"
networks:
- droneflightlog-network
depends_on:
- drone-api
drone-api:
container_name: droneflightlogservice
image: davewalker5/droneflightlogapisqlite:latest
restart: always
ports:
- "8092:80"
networks:
- droneflightlog-network
volumes:
- C:\DroneFlightLog:/var/opt/droneflightlog.api/
networks:
droneflightlog-network:
driver: bridge
- Make sure the "drone-ui" port number, 8082 in this example, is an unused port on the local machine
- The example assumes that the database file is in the local folder C:\DroneFlightLog
- This should be changed as appropriate
- To start the application, open a terminal window, change to the folder and run the following command:
docker compose --project-directory . up -d
- The output should look similar to this:
C:\DroneFlightLog>docker compose --project-directory . up -d
[+] Building 0.0s (0/0) docker:default
[+] Running 3/3
✔ Network droneflightlog_droneflightlog-network Created 0.1s
✔ Container droneflightlogservice Started 0.1s
✔ Container droneflightlogmvc Started 0.1s
- With the application running, browsing to the following URL should show the login page:
http://localhost:8082
- Replace the port number, 8082, with the port used for the "drone-ui" in the Docker Compose file
- To stop the application, from the same folder run the following command:
docker compose --project-directory . down
- The output should look similar to this:
C:\DroneFlightLog>docker compose --project-directory . down
[+] Running 3/3
✔ Container droneflightlogmvc Removed 0.5s
✔ Container droneflightlogservice Removed 0.6s
✔ Network droneflightlog_droneflightlog-network Removed 0.2s
- The first time the application is run, the flight properties will be empty and it is recommended that an initial set of properties is configured via the UI
- Once the application is running, setup the flight properties that can be associated with each flight
- Browse to the "Data Maintenance > Flight Properties" option and use it to add the properties that can be recorded against each flight
- The following is an example property set:
Property Name | Type | Single Instance |
---|---|---|
Wind Speed Minimum | Number | Yes |
Wind Speed Maximum | Number | Yes |
Wind Gust Speed | Number | Yes |
Temperature Minimum | Number | Yes |
Temperature Maximum | Number | Yes |
Battery Id | String | Yes |
Battery Charge Maximum | Number | Yes |
Battery Charge Minimum | Number | Yes |
Landings | Number | Yes |
Barometric Pressure | Number | Yes |
- For further information on flight properties, see the section on the "Database"