mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Add script & file for running production without docker
This commit is contained in:
parent
a63d76985c
commit
c7b01165fd
2
client/package-lock.json
generated
2
client/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf-client",
|
"name": "audiobookshelf-client",
|
||||||
"version": "1.0.0",
|
"version": "1.1.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"start": "nuxt start",
|
"start": "nuxt start",
|
||||||
"generate": "nuxt generate"
|
"generate": "nuxt generate"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "advplyr",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/axios": "^5.13.6",
|
"@nuxtjs/axios": "^5.13.6",
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf",
|
"name": "audiobookshelf",
|
||||||
"version": "1.1.7",
|
"version": "1.1.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "node index.js",
|
"dev": "node index.js",
|
||||||
"start": "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",
|
"author": "advplyr",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
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')
|
const Ffmpeg = require('fluent-ffmpeg')
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.FFMPEG_PATH) {
|
||||||
Ffmpeg.setFfmpegPath(process.env.FFMPEG_PATH)
|
Ffmpeg.setFfmpegPath(process.env.FFMPEG_PATH)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user