Compare commits
2 commits
a468eb5475
...
e0b90448fa
Author | SHA1 | Date | |
---|---|---|---|
e0b90448fa | |||
51030f6b40 |
2 changed files with 42 additions and 2 deletions
19
.drone.yml
19
.drone.yml
|
@ -0,0 +1,19 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: nexus-container
|
||||
|
||||
steps:
|
||||
- name: docker-build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: DOCKER_USERNAME
|
||||
password:
|
||||
from_secret: DOCKER_PASSWORD
|
||||
repo: aaronriedel/nexus
|
||||
tags: latest
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
25
start.sh
25
start.sh
|
@ -1,10 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
echo "---------------"
|
||||
echo "Nexus Dashboard"
|
||||
echo "by Aaron Riedel"
|
||||
echo "---------------"
|
||||
|
||||
echo "performing pre start check"
|
||||
# check if necessary variables are set
|
||||
[[ -z "${APP_SECRET_KEY}" ]] && echo "APP_SECRET_KEY not set" && exit 1
|
||||
[[ -z "${APP_DATABASE_URI}" ]] && echo "APP_DATABASE_URI not set" && exit 1
|
||||
# check if client is mounted
|
||||
[ ! -d "~/NexusDashboard/app/luclient" ] && echo "LU client not found" && exit 1
|
||||
[ ! -d "~/NexusDashboard/app/luclient/res" ] && echo "LU client is missing res folder" && exit 1
|
||||
[ ! -d "~/NexusDashboard/app/luclient/locale" ] && echo "LU client is missing locale folder" && exit 1
|
||||
# check if brickdb needs to be unzipped
|
||||
if [ -f "~/NexusDashboard/app/luclient/res/brickdb.zip" ]; then
|
||||
echo "brickdb.zip found"
|
||||
unzip ~/NexusDashboard/app/luclient/res/brickdb.zip
|
||||
rm ~/NexusDashboard/app/luclient/res/brickdb.zip
|
||||
echo "brickdb.zip unpacked and removed"
|
||||
fi
|
||||
# rename ~/NexusDashboard/app/luclient/res/CDServer.sqlite
|
||||
if [ -f "~/NexusDashboard/app/luclient/res/CDServer.sqlite" ]; then
|
||||
echo "moving CDServer.sqlite to cdclient.sqlite"
|
||||
mv ~/NexusDashboard/app/luclient/res/CDServer.sqlite ~/NexusDashboard/app/luclient/res/cdclient.sqlite
|
||||
fi
|
||||
cd ~/NexusDashboard
|
||||
echo "run database migration"
|
||||
flask db upgrade
|
||||
echo "start server"
|
||||
gunicorn -b :8000 -w 4 wsgi:app
|
Loading…
Add table
Add a link
Reference in a new issue