Add initial version of dijkstra backend cloudron image
This commit is contained in:
25
start.sh
Executable file
25
start.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
# ensure that data directory is owned by 'cloudron' user
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
echo "-> Create the database"
|
||||
# Move to the data writable folder
|
||||
cd /app/data/
|
||||
# Create database with empty table
|
||||
sqlite3 database_file.db3 "CREATE TABLE test (id INTEGER PRIMARY KEY)";
|
||||
#Delete the test table
|
||||
sqlite3 database_file.db3 "DROP TABLE test";
|
||||
|
||||
echo "-> Importing data to the database"
|
||||
# move back to code folder
|
||||
cd /app/code
|
||||
# Run the migration and seed database
|
||||
npm run loadDB
|
||||
|
||||
echo "-> Starting Dijkstra Backend"
|
||||
# run the app as user 'cloudron'
|
||||
exec /usr/local/bin/gosu cloudron:cloudron node /app/code/index.js
|
||||
|
||||
Reference in New Issue
Block a user