Adding additional resources for testing

Signed-off-by: Kris Nóva <kris@nivenly.com>
main
Kris Nóva 2021-02-03 17:01:38 -08:00
parent de26a3acd5
commit 41aa943c78
3 changed files with 11 additions and 2 deletions

View File

@ -9,6 +9,10 @@ func main() {
logger.Level = 4 logger.Level = 4
app := sampleapp.New() app := sampleapp.New()
var err error var err error
err = app.Create()
if err != nil {
logger.Critical(err.Error())
}
err = app.Start() err = app.Start()
if err != nil { if err != nil {
logger.Critical(err.Error()) logger.Critical(err.Error())

View File

@ -8,7 +8,7 @@ import (
) )
func main() { func main() {
uuid := os.Getenv("PHOTOPRISM_ID") uuid := os.Getenv("PHOTOPRISM_UUID")
if uuid == "" { if uuid == "" {
halt(2, "Missing PHOTOPRISM_UUID") halt(2, "Missing PHOTOPRISM_UUID")
} }
@ -17,5 +17,6 @@ func main() {
if err != nil { if err != nil {
halt(3, "Error fetching photo: %v", err) halt(3, "Error fetching photo: %v", err)
} }
fmt.Println(*photo) fmt.Println(*photo)
} }

View File

@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
#################################### ####################################
##### #####
@ -8,4 +9,7 @@
# Startup Script for the Application # Startup Script for the Application
#################################### ####################################
echo "Creating [SampleApp]" echo "Creating [SampleApp]"
docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v "/home/nova/go/src/github.com/kris-nova/client-go/sample-app/photoprism":"/photoprism" photoprism/photoprism
docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v photoprism:/photoprism photoprism/photoprism:latest