https://github.com/lexxai/goit_python_web_hw_14
GoIT, Python WEB, Homework number 14. Documentation. Testing. PyTest. Unittest. PyDoc. Sphinx. PyTest-cov. Deploy koyeb.com
https://github.com/lexxai/goit_python_web_hw_14
docker docker-compose documentation homework pytest pytest-cov python sphinx unittest
Last synced: about 2 months ago
JSON representation
GoIT, Python WEB, Homework number 14. Documentation. Testing. PyTest. Unittest. PyDoc. Sphinx. PyTest-cov. Deploy koyeb.com
- Host: GitHub
- URL: https://github.com/lexxai/goit_python_web_hw_14
- Owner: lexxai
- License: mit
- Created: 2023-11-24T19:27:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-07T09:10:50.000Z (over 2 years ago)
- Last Synced: 2026-04-17T10:39:09.457Z (2 months ago)
- Topics: docker, docker-compose, documentation, homework, pytest, pytest-cov, python, sphinx, unittest
- Language: Python
- Homepage:
- Size: 5.19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-DEPL.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPLOY to koyeb.com













## JS CLIENT

## AUTOMAIC RE-DEPLOOY ON GIT COMMIT

### IF AUTOMAIC RE-DEPLOOY ERROR

## RESULT AFTER AUTH

## KOYEB CACHED STATIC


```
class StaticFilesCache(StaticFiles):
def __init__(self, *args, cachecontrol="public, max-age=31536000, s-maxage=31536000, immutable", **kwargs):
self.cachecontrol = cachecontrol
super().__init__(*args, **kwargs)
def file_response(self, *args, **kwargs) -> Response:
resp: Response = super().file_response(*args, **kwargs)
resp.headers.setdefault("Cache-Control", self.cachecontrol)
return resp
def add_static(_app):
_app.mount(
path="/static",
app=StaticFilesCache(directory=settings.STATIC_DIRECTORY, cachecontrol="private, max-age=3600"),
name="static",
)
_app.mount(path="/sphinx", app=StaticFilesCache(directory=settings.SPHINX_DIRECTORY, html=True), name="sphinx")
```

## DATABASES
### PG KOYEB


### REDIS redislabs.com

