mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-24 08:46:24 -07:00
Add explanation if Docker boot fails because of missing js dir,
remove Username from gochan.json in Docker since there's no www-data user
This commit is contained in:
parent
c5f126ff45
commit
d94a0d8fcf
3 changed files with 10 additions and 1 deletions
9
build.py
9
build.py
|
@ -17,7 +17,7 @@ from pathlib import Path
|
|||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import traceback
|
||||
|
||||
release_files = (
|
||||
"html/banned.png",
|
||||
|
@ -339,6 +339,13 @@ def install(prefix="/usr", document_root="/srv/gochan", symlinks=False, js_only=
|
|||
mkdir(path.join(prefix, "share/gochan/templates/override/"))
|
||||
except shutil.SameFileError as err:
|
||||
print(err)
|
||||
except FileNotFoundError as err:
|
||||
if file == "html/js/":
|
||||
print("Missing html/js directory, this must be built before installation by running python3 build.py js, or mkdir html/js if you don't want JavaScript")
|
||||
else:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if path.exists(gochan_exe) is False:
|
||||
build()
|
||||
|
|
|
@ -42,6 +42,7 @@ EXPOSE 9000
|
|||
CMD ls -la /opt/gochan && ls -la && ls -la .. && sed -i /etc/gochan/gochan.json \
|
||||
-e 's/"Port": 8080/"Port": 9000/' \
|
||||
-e 's/"UseFastCGI": false/"UseFastCGI": true/' \
|
||||
-e 's/"Username": ".*",//' \
|
||||
-e 's#"DocumentRoot": "html"#"DocumentRoot": "/srv/gochan"#' \
|
||||
-e 's#"TemplateDir": "templates"#"TemplateDir": "/usr/share/gochan/templates"#' \
|
||||
-e 's#"LogDir": "log"#"LogDir": "/var/log/gochan"#' \
|
||||
|
|
|
@ -80,6 +80,7 @@ sed -i /etc/gochan/gochan.json \
|
|||
-e 's#"DocumentRoot": "html"#"DocumentRoot": "/srv/gochan"#' \
|
||||
-e 's#"TemplateDir": "templates"#"TemplateDir": "/usr/share/gochan/templates"#' \
|
||||
-e 's#"LogDir": "log"#"LogDir": "/var/log/gochan"#' \
|
||||
-e 's/"Username": ".*",/ /' \
|
||||
-e 's/"DBpassword": ""/"DBpassword": "gochan"/' \
|
||||
-e 's/"RandomSeed": ""/"RandomSeed": "abc123"/' \
|
||||
-e 's/"Verbosity": 0/"Verbosity": 1/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue