{"id":17216431,"url":"https://github.com/jteppinette/easypub","last_synced_at":"2025-03-25T13:43:06.276Z","repository":{"id":237426562,"uuid":"572687298","full_name":"jteppinette/easypub","owner":"jteppinette","description":"The free and anonymous online publisher.","archived":false,"fork":false,"pushed_at":"2022-12-10T02:08:19.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T12:32:53.917Z","etag":null,"topics":["free","opensource","privacy","secure"],"latest_commit_sha":null,"homepage":"https://easypub.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jteppinette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-30T20:15:45.000Z","updated_at":"2023-03-09T22:24:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e44e68f-548a-471f-8c57-926c0301c46e","html_url":"https://github.com/jteppinette/easypub","commit_stats":null,"previous_names":["jteppinette/easypub"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jteppinette%2Feasypub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jteppinette%2Feasypub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jteppinette%2Feasypub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jteppinette%2Feasypub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jteppinette","download_url":"https://codeload.github.com/jteppinette/easypub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245473775,"owners_count":20621287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["free","opensource","privacy","secure"],"created_at":"2024-10-15T03:27:43.790Z","updated_at":"2025-03-25T13:43:06.256Z","avatar_url":"https://github.com/jteppinette.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easypub.io\n\n## Development\n\n### Required Software\n\nRefer to the links provided below to install these development dependencies:\n\n- [direnv](https://direnv.net)\n- [docker](https://docs.docker.com/)\n- [git](https://git-scm.com/)\n- [prettier](https://prettier.io/docs/en/install.html)\n- [pyenv](https://github.com/pyenv/pyenv#installation)\n\n### Getting Started\n\n**Setup**\n\n```sh\n$ pyenv install 3.10.7\n$ direnv allow\n$ pip install -r requirements/dev.txt\n$ pre-commit install\n$ docker-compose up -d\n```\n\n**Tests**\n\n_Run_\n\n```sh\n$ pytest\n```\n\n_Watch_\n\n```sh\n$ ptw\n```\n\n**Run**\n\nThe runserver command should only be used in development. In production, gunicorn should be used. This is described in a later section.\n\n```sh\n$ easypub runserver\n```\n\n```sh\n$ open http://localhost:8000\n```\n\n## Usage\n\n**Dependencies**\n\n- Redis\n- S3 (like)\n\n**Environment Variables**\n\n```\nCACHE_URL\nDEBUG=0\nHOST\nREQUEST_TIMEOUT=5\nSTORAGE_URL\nWEB_CONCURRENCY=1\n```\n\n**Compile Static Assets**\n\nThe provided `easypub collectstatic` needs to be ran before engaging the production server. This will compile all\nstatic assets with the correct filename digest (required for proper caching).\n\n```sh\n$ easypub collectstatic\n```\n\nNotice, this is already included in the Heroku buildpack integration, so it is only necessary when performing a custom deployment.\n\n**Make Storage Bucket**\n\nThe provided `easypub makebucket` needs to be ran before engaging the production server. This will create\nthe required storage bucket in S3.\n\n```sh\n$ easypub makebucket\n```\n\nNotice, this is already included in the Heroku buildpack integration, so it is only necessary when performing a custom deployment.\n\n**Server**\n\n_We recommend using Gunicorn in production._\n\n```sh\n$ gunicorn --worker-class uvicorn.workers.UvicornWorker easypub.asgi:app\n```\n\nNotice, this is already included in the Heroku `Procfile`, so it is only necessary when performing a custom deployment.\n\n## Operations\n\n### Heroku\n\n**Deployment**\n\n```\n$ heroku create\n$ heroku addons:create heroku-redis:premium-0\n$ heroku config:set \\\n    CACHE_URL=`heroku config:get REDIS_URL` \\\n    HOST=\u003chost\u003e \\\n    STORAGE_URL=\u003cstorage_url\u003e\n$ git push heroku main\n```\n\n**Redis**\n\n```\n$ heroku redis:cli\n```\n\n### S3\n\nThe existing system cannot set the cors policy on the created bucket. If your bucket\nrequires updating the CORS policy you can use the example below as a reference:\n\n```sh\n$ aws s3api put-bucket-cors \\\n    --bucket \u003cbucket-name\u003e \\\n    --endpoint-url https://\u003cbucket-id\u003e.r2.cloudflarestorage.com \\\n    --cors-configuration file://cors.json\n```\n\n```json\n{\n  \"CORSRules\": [\n    {\n      \"AllowedOrigins\": [\"\u003corigin\u003e\"],\n      \"AllowedHeaders\": [\"*\"],\n      \"AllowedMethods\": [\"GET\"],\n      \"MaxAgeSeconds\": 3000\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjteppinette%2Feasypub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjteppinette%2Feasypub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjteppinette%2Feasypub/lists"}