structables 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {structables-0.4.0 → structables-0.4.1}/.forgejo/workflows/docker.yml +3 -6
- {structables-0.4.0 → structables-0.4.1}/.gitignore +1 -0
- {structables-0.4.0 → structables-0.4.1}/Dockerfile +1 -3
- {structables-0.4.0 → structables-0.4.1}/PKG-INFO +4 -2
- {structables-0.4.0 → structables-0.4.1}/README.md +2 -0
- {structables-0.4.0 → structables-0.4.1}/docker-compose-example-dev.yml +2 -1
- {structables-0.4.0 → structables-0.4.1}/docker-compose-example.yml +3 -2
- {structables-0.4.0 → structables-0.4.1}/pyproject.toml +2 -2
- {structables-0.4.0 → structables-0.4.1}/src/structables/config.py +19 -4
- {structables-0.4.0 → structables-0.4.1}/.env.example +0 -0
- {structables-0.4.0 → structables-0.4.1}/.forgejo/workflows/release.yml +0 -0
- {structables-0.4.0 → structables-0.4.1}/LICENSE +0 -0
- {structables-0.4.0 → structables-0.4.1}/cronjob.txt +0 -0
- {structables-0.4.0 → structables-0.4.1}/entrypoint.sh +0 -0
- {structables-0.4.0 → structables-0.4.1}/instances.json +0 -0
- {structables-0.4.0 → structables-0.4.1}/renovate.json +0 -0
- {structables-0.4.0 → structables-0.4.1}/requirements-dev.txt +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/__init__.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/main.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/__init__.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/category.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/contest.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/main.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/member.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/routes/proxy.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/static/css/iframe.css +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/static/css/style.css +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/static/img/logo.png +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/static/img/logo_lg.png +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/static/img/magnifying-glass-solid.svg +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/400.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/404.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/429.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/500.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/archives.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/article-review.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/article.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/base.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/category.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/collection.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/contest.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/contests.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/footer.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/header.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/iframe.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/index.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/member-instructables.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/member.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/privacypolicy.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/projects.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/sitemap.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/templates/style.html +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/utils/data.py +0 -0
- {structables-0.4.0 → structables-0.4.1}/src/structables/utils/helpers.py +0 -0
|
@@ -4,17 +4,14 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
6
|
- "*"
|
|
7
|
+
workflow_dispatch:
|
|
7
8
|
|
|
8
9
|
jobs:
|
|
9
10
|
docker:
|
|
10
11
|
name: Docker Build and Push to Docker Hub
|
|
11
12
|
container:
|
|
12
|
-
image:
|
|
13
|
+
image: catthehacker/ubuntu:act-latest
|
|
13
14
|
steps:
|
|
14
|
-
- name: Install dependencies
|
|
15
|
-
run: |
|
|
16
|
-
apt update
|
|
17
|
-
apt install -y docker.io
|
|
18
15
|
- name: Set up QEMU
|
|
19
16
|
uses: docker/setup-qemu-action@v3
|
|
20
17
|
- name: Set up Docker Buildx
|
|
@@ -30,4 +27,4 @@ jobs:
|
|
|
30
27
|
push: true
|
|
31
28
|
tags: |
|
|
32
29
|
privatecoffee/structables:latest
|
|
33
|
-
privatecoffee/structables:${{
|
|
30
|
+
privatecoffee/structables:${{ github.ref_name }}
|
|
@@ -12,10 +12,8 @@ RUN $APP_ENV/bin/pip install --no-cache-dir pip && \
|
|
|
12
12
|
$APP_ENV/bin/pip install /app && \
|
|
13
13
|
adduser -S -D -H structables
|
|
14
14
|
|
|
15
|
-
COPY entrypoint.sh /entrypoint.sh
|
|
16
|
-
|
|
17
15
|
EXPOSE 8002
|
|
18
16
|
|
|
19
17
|
USER structables
|
|
20
18
|
|
|
21
|
-
ENTRYPOINT ["/entrypoint.sh"]
|
|
19
|
+
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: structables
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: A simple frontend for Instructables
|
|
5
5
|
Project-URL: Homepage, https://git.private.coffee/privatecoffee/structables
|
|
6
6
|
Project-URL: Bug Tracker, https://git.private.coffee/privatecoffee/structables/issues
|
|
@@ -672,7 +672,7 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
|
672
672
|
Classifier: Operating System :: OS Independent
|
|
673
673
|
Classifier: Programming Language :: Python :: 3
|
|
674
674
|
Requires-Python: >=3.10
|
|
675
|
-
Requires-Dist:
|
|
675
|
+
Requires-Dist: beautifulsoup4
|
|
676
676
|
Requires-Dist: flask
|
|
677
677
|
Requires-Dist: markdown2[all]
|
|
678
678
|
Description-Content-Type: text/markdown
|
|
@@ -737,6 +737,8 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
737
737
|
|
|
738
738
|
### Production: Docker
|
|
739
739
|
|
|
740
|
+
**Note:** The Docker image is now hosted on [git.private.coffee](https://git.private.coffee/privatecoffee/structables/packages) instead of Docker Hub. Please use the new image name `git.private.coffee/privatecoffee/structables` instead of `privatecoffee/structables` to continue receiving updates.
|
|
741
|
+
|
|
740
742
|
1. Copy `.env.example` to `.env` and adjust the settings as necessary
|
|
741
743
|
2. Copy `docker-compose-example.yml` to `docker-compose.yml` and adjust it as necessary, for example modifying resource limits or changing the port/host configuration
|
|
742
744
|
3. Build and run the Docker container:
|
|
@@ -58,6 +58,8 @@ Of course, you can also join our [Matrix room](https://matrix.pcof.fi/#/#structa
|
|
|
58
58
|
|
|
59
59
|
### Production: Docker
|
|
60
60
|
|
|
61
|
+
**Note:** The Docker image is now hosted on [git.private.coffee](https://git.private.coffee/privatecoffee/structables/packages) instead of Docker Hub. Please use the new image name `git.private.coffee/privatecoffee/structables` instead of `privatecoffee/structables` to continue receiving updates.
|
|
62
|
+
|
|
61
63
|
1. Copy `.env.example` to `.env` and adjust the settings as necessary
|
|
62
64
|
2. Copy `docker-compose-example.yml` to `docker-compose.yml` and adjust it as necessary, for example modifying resource limits or changing the port/host configuration
|
|
63
65
|
3. Build and run the Docker container:
|
|
@@ -2,15 +2,16 @@ services:
|
|
|
2
2
|
structables:
|
|
3
3
|
container_name: structables
|
|
4
4
|
restart: unless-stopped
|
|
5
|
-
image: privatecoffee/structables:latest
|
|
5
|
+
image: git.private.coffee/privatecoffee/structables:latest
|
|
6
6
|
ports:
|
|
7
7
|
- "127.0.0.1:8002:8002"
|
|
8
|
+
volumes:
|
|
9
|
+
- ./cache:/app/structables_cache
|
|
8
10
|
env_file: .env
|
|
9
11
|
security_opt:
|
|
10
12
|
- no-new-privileges:true
|
|
11
13
|
cap_drop:
|
|
12
14
|
- ALL
|
|
13
|
-
read_only: true
|
|
14
15
|
deploy:
|
|
15
16
|
resources:
|
|
16
17
|
limits:
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "structables"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.1"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Private.coffee Team", email="support@private.coffee" },
|
|
10
10
|
]
|
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
21
|
"flask",
|
|
22
|
-
"
|
|
22
|
+
"beautifulsoup4",
|
|
23
23
|
"markdown2[all]",
|
|
24
24
|
]
|
|
25
25
|
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import tempfile
|
|
3
|
+
import logging
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
3
6
|
|
|
4
7
|
from .utils.helpers import get_typesense_api_key
|
|
5
8
|
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
6
11
|
|
|
7
12
|
class Config:
|
|
8
13
|
DEBUG = os.environ.get("FLASK_DEBUG", os.environ.get("STRUCTABLES_DEBUG", False))
|
|
@@ -24,10 +29,20 @@ class Config:
|
|
|
24
29
|
)
|
|
25
30
|
CACHE_DIR = os.environ.get("STRUCTABLES_CACHE_DIR")
|
|
26
31
|
|
|
27
|
-
if CACHE_DIR is None:
|
|
28
|
-
|
|
29
|
-
tempfile.gettempdir()
|
|
30
|
-
|
|
32
|
+
if CACHE_ENABLED and CACHE_DIR is None:
|
|
33
|
+
try:
|
|
34
|
+
CACHE_DIR = Path(tempfile.gettempdir()) / "structables_cache"
|
|
35
|
+
except FileNotFoundError:
|
|
36
|
+
CACHE_DIR = Path(os.getcwd()) / "structables_cache"
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
|
40
|
+
(CACHE_DIR / "test").write_text("test")
|
|
41
|
+
(CACHE_DIR / "test").unlink()
|
|
42
|
+
except Exception as e:
|
|
43
|
+
logger.error(f"Could not create or write to cache directory: {e} - disabling cache")
|
|
44
|
+
CACHE_ENABLED = False
|
|
45
|
+
CACHE_DIR = None
|
|
31
46
|
|
|
32
47
|
CACHE_MAX_AGE = int(
|
|
33
48
|
os.environ.get("STRUCTABLES_CACHE_MAX_AGE", 60 * 60 * 24 * 7)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structables-0.4.0 → structables-0.4.1}/src/structables/static/img/magnifying-glass-solid.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|