Skip to content

Commit

Permalink
Add more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kiootic committed Jun 27, 2023
1 parent ba27aa0 commit 40f4ccc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/guides/deploying-sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ uploading 100%
INFO Done!
```

To deploy as a preview deployment, omit the `site` parameter.
To deploy as a preview deployment, omit the `site` parameter. For details,
refer to [Preview Deployment](./features/preview-deployment.md) guide.

```
$ pageship deploy --site main
Expand Down
16 changes: 16 additions & 0 deletions docs/guides/features/automatic-tls.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Automatic TLS

Pageship supports automatic TLS through [certmagic](https://github.com/caddyserver/certmagic) library.

Automatic TLS can be activated by passing `--tls` command line parameter.
Certificates would be obtained from Let's Encrypt when a site domain is accessed
for the first time. It is recommnded to provide a email to receive notifications
from certificate issuer using `--tls-acme-email` command line parameter.

## Certificate Persistence

In single-site & unmanaged-sites mode, certificate data is stored on the default
filesystem directory specified by `certmagic` library
(`${XDG_DATA_HOME}/certmagic`) in plain-text. Care should be taken to secure
the key materials.

In managed sites mode, certificate data is stored in database. Optionally, an
encryption key can be specified through `--tls-protect-key` parameter to
encrypt the certificate data at rest using NaCL secretbox.
24 changes: 24 additions & 0 deletions docs/guides/features/preview-deployment.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# Preview Deployment

Pageship supports preview deployments. When a deployment is created without
assigning to a site, it is treated as preview deployments.

Preview deployments has limited lifetime, and expires after a period not
assigned to a site. This period can be configured in `pageship.toml`:
```toml
[app.deployments]
ttl = "24h" # expires after 24 hours.
```

An expired preview deployment is inaccessible and deleted automatically after
some time.

## Access Control

By default, preview deployments are not accessible. To enable access to
preview deployments, setup access control for preview deployment in `pageship.toml`:
```toml
[app.deployments]
access = [
{ ipRange="0.0.0.0/0" } # preview deployments are accessible to anyone.
]
```
2 changes: 1 addition & 1 deletion docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docker images are available from GitHub Packages:

```sh
docker pull ghcr.io/oursky/pageship:v0.3.1
docker pull ghcr.io/oursky/pageship:v0.3.1
docker pull ghcr.io/oursky/pageship-controller:v0.3.1
```

## Go install
Expand Down

0 comments on commit 40f4ccc

Please sign in to comment.