Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
9f58a08f
Commit
9f58a08f
authored
Jun 01, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: heroku compatibility
parent
e49cb038
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
24 deletions
+9
-24
Dockerfile
dev/build/Dockerfile
+2
-0
index.js
dev/index.js
+4
-18
package.json
package.json
+1
-4
config.js
server/core/config.js
+1
-1
db.js
server/core/db.js
+1
-1
No files found.
dev/build/Dockerfile
View file @
9f58a08f
...
...
@@ -46,4 +46,6 @@ USER node
EXPOSE
3000
# HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 CMD curl -f http://localhost/healthz
CMD
["node", "server"]
wiki
.js
→
dev/index
.js
View file @
9f58a08f
...
...
@@ -15,7 +15,7 @@ const init = {
const
chokidar
=
require
(
'chokidar'
)
global
.
DEV
=
true
global
.
WP_CONFIG
=
require
(
'./
dev/
webpack/webpack.dev.js'
)
global
.
WP_CONFIG
=
require
(
'./webpack/webpack.dev.js'
)
global
.
WP
=
webpack
(
global
.
WP_CONFIG
)
global
.
WP_DEV
=
{
devMiddleware
:
require
(
'webpack-dev-middleware'
)(
global
.
WP
,
{
...
...
@@ -25,7 +25,7 @@ const init = {
}
global
.
WP_DEV
.
devMiddleware
.
waitUntilValid
(()
=>
{
console
.
info
(
chalk
.
yellow
.
bold
(
'>>> Starting Wiki.js in DEVELOPER mode...'
))
require
(
'./server'
)
require
(
'.
.
/server'
)
process
.
stdin
.
setEncoding
(
'utf8'
)
process
.
stdin
.
on
(
'data'
,
data
=>
{
...
...
@@ -84,22 +84,8 @@ const init = {
process
.
removeAllListeners
(
'unhandledRejection'
)
process
.
removeAllListeners
(
'uncaughtException'
)
require
(
'./server'
)
require
(
'.
.
/server'
)
}
}
require
(
'yargs'
)
// eslint-disable-line no-unused-expressions
.
usage
(
'Usage: node $0 <cmd> [args]'
)
.
command
({
command
:
'dev'
,
desc
:
'Start in Developer Mode'
,
handler
:
argv
=>
{
init
.
dev
()
}
})
.
recommendCommands
()
.
demandCommand
(
1
,
'You must provide one of the accepted commands above.'
)
.
help
()
.
version
()
.
epilogue
(
'Read the docs at https://docs-beta.requarks.io/dev'
)
.
argv
init
.
dev
()
package.json
View file @
9f58a08f
...
...
@@ -6,14 +6,11 @@
"main"
:
"wiki.js"
,
"scripts"
:
{
"start"
:
"node server"
,
"dev"
:
"node
wiki
dev"
,
"dev"
:
"node dev"
,
"build"
:
"webpack --profile --config dev/webpack/webpack.prod.js"
,
"watch"
:
"webpack --config dev/webpack/webpack.dev.js"
,
"test"
:
"eslint --format codeframe --ext .js,.vue . && pug-lint server/views && jest"
},
"bin"
:
{
"wiki"
:
"wiki.js"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/Requarks/wiki.git"
...
...
server/core/config.js
View file @
9f58a08f
...
...
@@ -48,7 +48,7 @@ module.exports = {
appconfig
=
_
.
defaultsDeep
(
appconfig
,
appdata
.
defaults
.
config
)
if
(
appconfig
.
port
<
1
)
{
if
(
appconfig
.
port
<
1
||
process
.
env
.
HEROKU
)
{
appconfig
.
port
=
process
.
env
.
PORT
||
80
}
...
...
server/core/db.js
View file @
9f58a08f
...
...
@@ -24,7 +24,7 @@ module.exports = {
let
self
=
this
let
dbClient
=
null
let
dbConfig
=
(
!
_
.
isEmpty
(
process
.
env
.
WIKI_DB_CONNSTR
))
?
process
.
env
.
WIKI_DB_CONNSTR
:
{
let
dbConfig
=
(
!
_
.
isEmpty
(
process
.
env
.
DATABASE_URL
))
?
process
.
env
.
DATABASE_URL
:
{
host
:
WIKI
.
config
.
db
.
host
,
user
:
WIKI
.
config
.
db
.
user
,
password
:
WIKI
.
config
.
db
.
pass
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment