mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-10 08:34:08 +02:00
fix CUSTOM_TEMPLATES_DIR config load and chrome symlinking
This commit is contained in:
@@ -60,11 +60,14 @@ class BaseBinary(BaseHook, Binary):
|
||||
if not (binary.abspath and binary.abspath.exists()):
|
||||
return
|
||||
|
||||
bin_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
symlink = bin_dir / binary.name
|
||||
symlink.unlink(missing_ok=True)
|
||||
symlink.symlink_to(binary.abspath)
|
||||
try:
|
||||
bin_dir.mkdir(parents=True, exist_ok=True)
|
||||
symlink = bin_dir / binary.name
|
||||
symlink.unlink(missing_ok=True)
|
||||
symlink.symlink_to(binary.abspath)
|
||||
except Exception as err:
|
||||
# print('[red]:caution: Failed to symlink binary into ./lib/bin folder[/red]', err)
|
||||
pass
|
||||
|
||||
@validate_call
|
||||
def load(self, **kwargs) -> Self:
|
||||
|
@@ -140,7 +140,7 @@ class ServerConfig(BaseConfigSet):
|
||||
|
||||
SNAPSHOTS_PER_PAGE: int = Field(default=40)
|
||||
FOOTER_INFO: str = Field(default='Content is hosted for personal archiving purposes only. Contact server owner for any takedown requests.')
|
||||
CUSTOM_TEMPLATES_DIR: Path = Field(default=None)
|
||||
# CUSTOM_TEMPLATES_DIR: Path = Field(default=None) # this is now a constant
|
||||
|
||||
PUBLIC_INDEX: bool = Field(default=True)
|
||||
PUBLIC_SNAPSHOTS: bool = Field(default=True)
|
||||
|
@@ -197,7 +197,7 @@ def get_real_name(key: str) -> str:
|
||||
DYNAMIC_CONFIG_SCHEMA: ConfigDefaultDict = {
|
||||
'PACKAGE_DIR': {'default': lambda c: CONSTANTS.PACKAGE_DIR.resolve()},
|
||||
'TEMPLATES_DIR': {'default': lambda c: c['PACKAGE_DIR'] / CONSTANTS.TEMPLATES_DIR_NAME},
|
||||
'CUSTOM_TEMPLATES_DIR': {'default': lambda c: c['CUSTOM_TEMPLATES_DIR'] and Path(c['CUSTOM_TEMPLATES_DIR'])},
|
||||
# 'CUSTOM_TEMPLATES_DIR': {'default': lambda c: c['CUSTOM_TEMPLATES_DIR'] and Path(c['CUSTOM_TEMPLATES_DIR'])}, # this is now a constant
|
||||
|
||||
|
||||
'URL_DENYLIST_PTN': {'default': lambda c: c['URL_DENYLIST'] and re.compile(c['URL_DENYLIST'] or '', CONSTANTS.ALLOWDENYLIST_REGEX_FLAGS)},
|
||||
|
@@ -31,12 +31,12 @@ SELECTED_PLATFORMS="${2:-$SUPPORTED_PLATFORMS}"
|
||||
|
||||
echo "[^] Uploading docker image"
|
||||
docker buildx build --platform "$SELECTED_PLATFORMS" --push . \
|
||||
-t archivebox/archivebox:$TAG_NAME \
|
||||
-t archivebox/archivebox:$GIT_SHA \
|
||||
-t nikisweeting/archivebox:$TAG_NAME \
|
||||
-t nikisweeting/archivebox:$GIT_SHA \
|
||||
-t ghcr.io/archivebox/archivebox:$TAG_NAME \
|
||||
-t ghcr.io/archivebox/archivebox:$GIT_SHA
|
||||
-t archivebox/archivebox:"$TAG_NAME" \
|
||||
-t archivebox/archivebox:"$GIT_SHA" \
|
||||
-t nikisweeting/archivebox:"$TAG_NAME" \
|
||||
-t nikisweeting/archivebox:"$GIT_SHA" \
|
||||
-t ghcr.io/archivebox/archivebox:"$TAG_NAME" \
|
||||
-t ghcr.io/archivebox/archivebox:"$GIT_SHA"
|
||||
# -t archivebox/archivebox \
|
||||
# -t archivebox/archivebox:$VERSION \
|
||||
# -t archivebox/archivebox:$SHORT_VERSION \
|
||||
|
Reference in New Issue
Block a user