mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Add script & file for running production without docker
This commit is contained in:
parent
2f6417dec2
commit
b3ad9c95ce
2
client/package-lock.json
generated
2
client/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "audiobookshelf-client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.13",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -9,7 +9,7 @@
|
||||
"start": "nuxt start",
|
||||
"generate": "nuxt generate"
|
||||
},
|
||||
"author": "",
|
||||
"author": "advplyr",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@nuxtjs/axios": "^5.13.6",
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "audiobookshelf",
|
||||
"version": "1.1.7",
|
||||
"version": "1.1.13",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "node index.js",
|
||||
"start": "node index.js",
|
||||
"prod": "NODE_ENV=production node index.js"
|
||||
"client": "cd client && npm install --production && npm run generate",
|
||||
"prod": "npm run client && npm install && node prod.js"
|
||||
},
|
||||
"author": "advplyr",
|
||||
"license": "ISC",
|
||||
@ -29,4 +30,4 @@
|
||||
"watcher": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
}
|
||||
|
16
prod.js
Normal file
16
prod.js
Normal file
@ -0,0 +1,16 @@
|
||||
const Path = require('path')
|
||||
process.env.TOKEN_SECRET = '09f26e402586e2faa8da4c98a35f1b20d6b033c6097befa8be3486a829587fe2f90a832bd3ff9d42710a4da095a2ce285b009f0c3730cd9b8e1af3eb84df6611'
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const server = require('./server/Server')
|
||||
global.appRoot = __dirname
|
||||
|
||||
const PORT = process.env.PORT || 3333
|
||||
const CONFIG_PATH = process.env.CONFIG_PATH || Path.resolve('config')
|
||||
const AUDIOBOOK_PATH = process.env.AUDIOBOOK_PATH || Path.resolve('audiobooks')
|
||||
const METADATA_PATH = process.env.METADATA_PATH || Path.resolve('metadata')
|
||||
|
||||
console.log('Config', CONFIG_PATH, METADATA_PATH, AUDIOBOOK_PATH)
|
||||
|
||||
const Server = new server(PORT, CONFIG_PATH, METADATA_PATH, AUDIOBOOK_PATH)
|
||||
Server.start()
|
@ -1,6 +1,6 @@
|
||||
const Ffmpeg = require('fluent-ffmpeg')
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (process.env.FFMPEG_PATH) {
|
||||
Ffmpeg.setFfmpegPath(process.env.FFMPEG_PATH)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user