Update From 0
parent
c8f1aac8cc
commit
1c1237932b
91
From-0.md
91
From-0.md
|
@ -101,6 +101,95 @@ The site will pull structured content from:
|
|||
- That the built static files exist and are accessible on the server.
|
||||
- Need further debugging with Clever Cloud logs and possibly adjusting deployment config.
|
||||
|
||||
after some more debugging:
|
||||
|
||||
After some debugging:
|
||||
|
||||
It turns out that you’re fighting the Python buildpack’s “uWSGI or bust” logic: by default any Python app on Clever-Cloud must supply a CC_PYTHON_MODULE (so it can spin up uWSGI). If you remove that var, the buildpack refuses to start anything. If you set it to “none,” it tries to import a module called none under uWSGI and blows up.
|
||||
|
||||
You have two clean ways out:
|
||||
|
||||
— Option A: Switch to a static site app on Clever-Cloud
|
||||
— Option B: Ship your own container (Docker) and completely bypass the Python buildpack
|
||||
|
||||
I’ll outline both. Pick the one you prefer:
|
||||
|
||||
––––––––––––––––––––––––––––––––
|
||||
Option A: Use Clever-Cloud’s Static Site “Flavor”
|
||||
––––––––––––––––––––––––––––––––
|
||||
|
||||
In the Clever-Cloud Console, click + New app → Static Sites
|
||||
Link it to your Git repo (same repo you’ve been pushing)
|
||||
In the “Build command” field enter:
|
||||
pip install -r requirements.txt && mkdocs build
|
||||
In the “Output Directory” field enter:
|
||||
site
|
||||
Save & deploy.
|
||||
• Clever-Cloud’s Static Sites service will run your build, then serve the site/ folder as plain static files off HTTP(S).
|
||||
• No uWSGI, no CC_PYTHON_MODULE, no hacking start scripts.
|
||||
• Logs will show the pip install, the mkdocs build, and then “serving static directory.”
|
||||
|
||||
When it goes green, point your DNS (CNAME or A record) at the static-sites endpoint and you’re done.
|
||||
|
||||
|
||||
Given that 0_timeline is purely a static website whose content is auto-generated from your Forgejo repos, the path of least resistance—and the most “Cloud-native” way on Clever Cloud—is to treat it as a Static Site rather than a “Python Web” application.
|
||||
|
||||
Here’s why and how:
|
||||
|
||||
You have zero dynamic backend code.
|
||||
MkDocs produces a self-contained site/ folder of HTML/CSS/JS.
|
||||
Clever Cloud’s Static Site service will:
|
||||
• Run your build command,
|
||||
• Publish the site/ directory to a CDN-backed endpoint,
|
||||
• Handle SSL/DNS for you,
|
||||
• Give you automatic cache invalidation on each deploy.
|
||||
STEP BY STEP: “STATIC SITE” ON CLEVER CLOUD
|
||||
|
||||
In the Clever Cloud console, create a new application of type Static Sites
|
||||
– Give it a name (0-timeline or similar).
|
||||
– Link it to your Git repository (the same repo you’ve been pushing).
|
||||
Configure the build:
|
||||
Build Command:
|
||||
bash
|
||||
|
||||
Copy Code
|
||||
pip install -r requirements.txt && mkdocs build
|
||||
Output Directory:
|
||||
Code
|
||||
|
||||
Copy Code
|
||||
site
|
||||
Commit any missing pieces to your repo:
|
||||
requirements.txt listing mkdocs + material + plugins
|
||||
mkdocs.yml + docs/ as you already have
|
||||
(No start.sh or python.json needed here)
|
||||
Push your changes:
|
||||
bash
|
||||
|
||||
Copy Code
|
||||
git add requirements.txt
|
||||
git commit -m "Prepare for Clever Cloud Static Site: add requirements.txt"
|
||||
git push origin main
|
||||
Clever Cloud will pick it up, run pip install… && mkdocs build, then serve the site/ folder.
|
||||
Watch the deployment logs in the Static Site dashboard. You should see:
|
||||
Code
|
||||
|
||||
Copy Code
|
||||
> pip install -r requirements.txt
|
||||
> mkdocs build
|
||||
Building documentation...
|
||||
Finished in x.xs
|
||||
Publishing site/
|
||||
When it’s “Published,” the dashboard will show your https://something.static.cleverapps.io/ URL.
|
||||
– Test it: you should see your MkDocs site live.
|
||||
– Under “Domains,” you can attach your custom domain (timeline0.org) with a CNAME record.
|
||||
BENEFITS
|
||||
|
||||
• No fiddling with uWSGI or Python buildpacks.
|
||||
• Zero extra runtime processes—just a fast static host & CDN.
|
||||
• Automatic SSL, cache invalidation, rollbacks.
|
||||
• Works out-of-the-box with mkdocs-material’s JS/CSS bundles, search, etc.
|
||||
|
||||
---
|
||||
|
||||
It is now deployed and running on clever cloud.
|
||||
|
||||
|
|
Loading…
Reference in New Issue