Run Codeberg Pages in conjuction with your own self-hosted Gitea instance using Docker. Codeberg Pages is a Go application that serves the content of repos on a Gitea server over HTTPS and generates an SSL certificate for domains.
- Add a .domains file to your repository. Multiple domains can be added using line breaks.
- Add a CNAME entry to the domain in your DNS server/provider's panel
custom.domain. IN CNAME branch.repo.owner.pages.domain
(For example, to have the 'pages' branch on https://git.example.com/admin/pages-repo point to example.org, it would be example.org. IN CNAME pages.pages-repo.admin.git.example.com
)
These can be set either in the Dockerfile or in whichever Docker client application you use.
Variable name | Purpose | Default value |
---|---|---|
PAGES_DOMAIN | The domain your pages should be served from | pages.domain |
GITEA_ROOT | The domain your Gitea instance is served from | https://git.domain |
GITEA_API_TOKEN | An (optional) requirement for accessing private repos | <not set> |
RAW_DOMAIN | The domain raw resources (for resources outside the 'pages' branch) to be hosted on | raw.pages.domain |
RAW_INFO_PAGE | The page loaded if a request for a raw resource returns 404 | <not set> |
ACME_API | The domain ACME requests for certificate renewals will be made | https://acme.mock.directory |
ACME_EMAIL | The email address sent to the ACME provider during requests | [email protected] |
ACME_USE_RATE_LIMITS | Defines whether requests to the ACME server are rate-limited | true |
DNS_PROVIDER | The DNS provider used to validate requests for ACME certificates | <not set> |
ENABLE_HTTP_SERVER | Enable HTTP requests (on port 80) to be made to the Pages server | true |