By App build documentation
List of Starsky Projects
- By App documentation database photo index & import index project
- starsky web api application / interface
- clientapp react front-end application
- starskyImporterCli import command line interface
- starskyGeoCli gpx sync and reverse 'geo tagging'
- starskyWebHtmlCli publish web images to a content package
- starskyWebFtpCli copy a content package to a ftp service
- starskyAdminCli manage user accounts
- starskySynchronizeCli check if disk changes are updated in the database
- starskyThumbnailCli speed web performance by generating smaller images
- Starsky Business Logic business logic libraries (.NET)
- starskyTest mstest unit tests (for .NET)
- starsky web api application / interface
- starsky-tools nodejs tools to add-on tasks
- Starsky Desktop Desktop Application (Pre-alpha code)
- Download Desktop App Windows and Mac OS version
- Changelog Release notes and history
Run pre-build binaries (fastest)
See the How use prebuild images for more details about how to run docker
Build instructions for docker
See the Docker instructions for more details about how to compile the application for development
Build instructions (without docker)
- To get started clone the repository
git clone "https://github.com/qdraw/starsky.git"
Get the
dotnet
6.0.416 SDK. To get the 'Build apps - SDK' .NET Core from https://www.microsoft.com/net/download or https://versionsof.net/Get a recent version of nodejs (18.x or newer)
Make a build of all the projects and run the tests from the root folder of the repository
When using powershell:
.\build.ps1
When you see 'build.ps1 cannot be loaded because running scripts is disabled on this system.'
For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. Run the following command to enable scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Or using bash (on Linux and Mac OS)
./build.sh
- Check configuration
starsky/starsky/appsettings.json
Tip: You could use machine specific configuration files: appsettings.{machinename}.json (and replace {machinename} with your computer name in lowercase)
- Run
dotnet run --project starsky/starsky --urls "http://localhost:4000"
- Create a account in the Starsky application. Those credentials are only required by the web application
Security issue: After creating the first account this endpoint is closed, keep the env variable
app__isAccountRegisterOpen
tofalse
http://localhost:4000/account/register
Dev-dependencies:
- Editorconfig (http://editorconfig.org/)
- Use DB Browser for SQLite to view a local SQLite database (optional)
Build for Raspberry Pi (Raspbian/Linux ARM)
From .NET Core 2.1 or newer there is a SDK available for Raspberry Pi (only ARMv7 or newer, so no ARMv6). We use NET Core But in this guide we build it first on your laptop and copy to your Raspberry Pi. Use the following steps to setup:
- Clone the repo on your x86/x64 machine
git clone "https://github.com/qdraw/starsky.git"
On your laptop (x86/x64 machine). Get the
dotnet
6.0 or newer SDK. To get the 'Build apps - SDK' .NET Core from https://www.microsoft.com/net/downloadCompile the Starsky-installation on your x86/x64 machine first. The cake build script with parameters can be used to build for this runtime.
Using bash
./build.sh --runtime="linux-arm"
Using Powershell
powershell -File build.ps1 -ScriptArgs '-runtime="linux-arm"'
Copy contents from the
linux-arm
folder to your Raspberry PiOn the Raspi, install the dependency packages first. Those are required by .NET Core
sudo apt-get install curl libunwind8 gettext apt-transport-https tzdata
- (Optional) On the Raspberry PI, install Exiftool
ExifTool is installed on the first run. When you use system ExifTool you need to update the AppSettings
sudo apt-get install libimage-exiftool-perl
- Run the Starsky web interface
./starsky
- Create a account in the Starsky Web application. Those credentials are only required by the web application
http://localhost:5000/account/register
Optional steps
- The script
pm2-new-instance.sh
is a script to setup Starsky using pm2.
export ASPNETCORE_URLS="http://localhost:4823/"
export ASPNETCORE_ENVIRONMENT="Production"
- SonarQube scanner
For SonarScanner you need to additionally install:
To enable SonarScanner you need to set the following environment variables:
STARSKY_SONAR_KEY
- the public name of the projectSTARSKY_SONAR_TOKEN
- the token to loginSTARSKY_SONAR_ORGANISATION
- the name of the organisationSTARSKY_SONAR_URL
- defaults to sonarcloud.io
Known errors
When using SQLite as database type without SQLitePCLRaw.lib.e_sqlite3.linux
the following error appears:
System.DllNotFoundException: Unable to load DLL 'e_sqlite3'
To avoid the error: System.IO.FileLoadException
Microsoft.Extensions.Options, Version=2.0.2.0
the package `Microsoft.EntityFrameworkCore is installed
Tip: When using MariaDB or MySQL as database, make sure you use
utf8mb4
and as collateutf8mb4_unicode_ci
to avoid encoding errors.
Cannot open shared object file: Permission denied
./starsky
Failed to load ?? error: <yourpath>/libhostfxr.so: cannot open shared object file: Permission denied
The library libhostfxr.so was found, but loading it from <yourpath>/libhostfxr.so failed
- Installing .NET Core prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
Check your file rights in the folders, they should be 644 for files and 755 for folders. except for the executable files
Startup problems with StarskyApp
You could try to clean the temp Folder This is located on Mac OS: ~/Library/Application\ Support/starsky/
and Windows: C:\Users\<user>\AppData\Roaming\starsky\
Bash build and configuration scripts
Those scripts are optional and used for configuration.
pm2 ./pm2-install-latest-release.sh
To install and upgrade to the latest stable release run this script
It uses the following default parameters
--name starsky
--runtime linux-arm
pm2 ./pm2-new-instance.sh
The script pm2-new-instance.sh
is a script to setup Starsky using pm2.
You should install pm2 before running this script
It uses the following env settings
export ASPNETCORE_URLS="http://localhost:4823/"
export ASPNETCORE_ENVIRONMENT="Production"
- It uses by default the name
starsky
in pm2 - If this name already exist, it overwrite this name with the new location
pm2 ./pm2-deploy-on-env.sh
To update starsky-$RUNTIME.zip with the content of the folder and to remove the content of the parent folder of this script. The following content are not deleted: app settings, temp, zip files and database files. The starsky files will get executed and need to have those rights. The pm2 instance will be restarted.
pm2 ./pm2-warmup.sh
To warmup the installation after a restart this bash script is provided
If you prefer a Powershell script, you could use pm2-warmup.ps1
Publish-scripts for 'self containing' binaries
The scripts that are used to create a full build. (Linux has libunwind8
and gettext
as dependency)
The Cake script provide options to build for specific runtimes.
To build server app for Mac OS
Using bash
./build.sh --runtime="osx-x64,osx-arm64"
Using powershell
powershell -File build.ps1 -ScriptArgs '-runtime="osx-x64,osx-arm64"'
To build server app for 64 bits Windows
Using bash
./build.sh --runtime="win-x64"
Using powershell
powershell -File build.ps1 -ScriptArgs '-runtime="win-x64"'