The website of Pyjoyment, at https://pyjoyment.dev: an application of Pyjoyment that runs as a function of AWS Lambda behind CloudFront, with its static files and its dynamic pages.
The application is site/app.py, a script of Pyjoyment.Lite, with its
templates in site/templates and its static files in site/public:
uv run --directory site python app.py daemonIt listens on http://127.0.0.1:3000. The tests run it as a server and as the function of Lambda:
uv run --project site python -m Pyjo.Prove -l -r tgenerate lambda-zip writes site/dist/function.zip, with the application
alone, for the public layer of Pyjoyment of
Pyjoyment-Lambda-Layers:
uv run --directory site python app.py generate lambda-zip --arch arm64 --runtime python3.15 --function-onlyA push to main builds the function and deploys it, with the role of the
environment production. deploy.py deploys a build by hand too:
AWS_PROFILE=<profile> uv run --project site python deploy.py --distribution E3L54LJQ60FS5U site/dist/function.ziptofu/ creates the function, its Function URL, the CloudFront distribution,
the certificate and the records of the domain in Cloudflare. It needs a
profile of AWS of the account 959435416781 and a token of the API of
Cloudflare, in tofu/terraform.tfvars:
cloudflare_api_token = "..."The first apply takes the function of the build above:
AWS_PROFILE=<profile> tofu -chdir=tofu init
AWS_PROFILE=<profile> tofu -chdir=tofu plan -out=tfplan
AWS_PROFILE=<profile> tofu -chdir=tofu apply tfplanArtistic License 2.0.