Skip to content

Commit

Permalink
add fly.toml and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
reorx committed Oct 16, 2022
1 parent f5ad76a commit 27af2fa
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ To build the project, simply follow the steps below.
There are various hosting services like GitHub Pages, Cloudflare Pages, Netlify.
Examples will be documented later on.

If you are happy with the look and functionality of sui2, it is recommended to use this project as a submodule rather than fork it. Please checkout [reorx/start](https://github.com/reorx/start) as an example for how to use it in another project, and how to build with GitHub Actions and deploy to Cloudflare Pages.

## Deploy using Docker

> Notice: to make the preview page in live editor work more predictable, Docker image does not provide PWA support
Expand All @@ -43,7 +45,7 @@ The image is hosted on Docker hub at: [reorx/sui2](https://hub.docker.com/r/reor

Run the following command to get started:

```
```bash
docker run --rm -t -p 3000:3000 -v data:/data reorx/sui2
```

Expand All @@ -56,6 +58,8 @@ After the container is alive, open `http://DOCKER_HOST:3000/` to see the initial

For the live editor, open `http//DOCKER_HOST:3000/editor/`, there's no link for it on the startpage.

Checkout the configuration file [fly.toml](https://github.com/reorx/sui2/blob/master/fly.toml) as an example for how to deploy the Docker image to fly.io

## `data.json` editing

There's a full example in [data.example.json](https://github.com/reorx/sui2/blob/master/data.example.json),
Expand Down
46 changes: 46 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# fly.toml file generated for sui2 on 2022-10-16T22:59:50+08:00

app = "sui2"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []


[build]
image = "reorx/sui2:latest"

[env]

[mounts]
source="sui2_data"
destination="/data"

[experimental]
allowed_public_ports = []
auto_rollback = true

[[services]]
http_checks = []
internal_port = 3000
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"

[[services.ports]]
force_https = true
handlers = ["http"]
port = 80

[[services.ports]]
handlers = ["tls", "http"]
port = 443

[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"

0 comments on commit 27af2fa

Please sign in to comment.