Skip to content

Instantly share code, notes, and snippets.

@siriokun
Last active June 15, 2023 18:05
Show Gist options
  • Select an option

  • Save siriokun/ec171a0875f58b185c7c16c74aa4175d to your computer and use it in GitHub Desktop.

Select an option

Save siriokun/ec171a0875f58b185c7c16c74aa4175d to your computer and use it in GitHub Desktop.

Revisions

  1. siriokun renamed this gist May 24, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. siriokun revised this gist May 24, 2023. 1 changed file with 0 additions and 44 deletions.
    44 changes: 0 additions & 44 deletions fly.toml
    Original file line number Diff line number Diff line change
    @@ -1,44 +0,0 @@
    # Fly.toml v1

    app = "sitename"
    kill_signal = "SIGINT"
    kill_timeout = 5
    primary_region = "cdg"
    processes = []

    [build]
    image = "ghost:latest"

    [env]
    url = "https://sitename.fly.dev"
    [mounts]
    source="data"
    destination="/var/lib/ghost/content"
    [experimental]
    auto_rollback = true

    [[services]]
    http_checks = []
    internal_port = 2368
    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"
  3. siriokun revised this gist May 24, 2023. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions fly-v2.toml
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,6 @@ primary_region = "cdg"
    [http_service]
    internal_port = 2368
    force_https = true
    auto_stop_machines = true
    auto_start_machines = true
    min_machines_running = 0
    auto_stop_machines = false
    auto_start_machines = false
    min_machines_running = 1
  4. siriokun revised this gist May 24, 2023. 3 changed files with 24 additions and 2 deletions.
    20 changes: 20 additions & 0 deletions fly-v2.toml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #
    # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
    #

    app = "sitename"
    primary_region = "cdg"

    [build]
    image = "ghost:5.49-alpine"

    [mounts]
    source="data"
    destination="/var/lib/ghost/content"

    [http_service]
    internal_port = 2368
    force_https = true
    auto_stop_machines = true
    auto_start_machines = true
    min_machines_running = 0
    2 changes: 2 additions & 0 deletions fly.toml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Fly.toml v1

    app = "sitename"
    kill_signal = "SIGINT"
    kill_timeout = 5
    4 changes: 2 additions & 2 deletions ghost.sh
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,6 @@ flyctl launch --name sitename --image=ghost:latest --region cdg --no-deploy
    flyctl volumes create data --region cdg --size 1
    ## change fly.toml above
    flyctl secrets set url=https://sitename.fly.dev
    flyctl secrets set -a sitename NODE_ENV=development
    fly secrets set database__connection__filename=/var/lib/ghost/content/data/ghost-dev.db
    flyctl secrets set NODE_ENV=development
    flyctl secrets set database__connection__filename=/var/lib/ghost/content/data/ghost-dev.db
    flyctl deploy
  5. siriokun revised this gist Apr 15, 2023. 2 changed files with 36 additions and 2 deletions.
    36 changes: 35 additions & 1 deletion fly.toml
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,42 @@
    app = "sitename"
    kill_signal = "SIGINT"
    kill_timeout = 5
    primary_region = "cdg"
    processes = []

    [build]
    image = "ghost:latest"

    [env]
    url = "https://sitename.fly.dev"
    [mounts]
    source="data"
    destination="/var/lib/ghost/content"
    [experimental]
    auto_rollback = true

    [[services]]
    http_checks = []
    internal_port = 2368
    internal_port = 2368
    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"
    2 changes: 1 addition & 1 deletion ghost.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    flyctl launch --name sitename --image=ghost:5.14.2-alpine --region cdg --no-deploy
    flyctl launch --name sitename --image=ghost:latest --region cdg --no-deploy
    flyctl volumes create data --region cdg --size 1
    ## change fly.toml above
    flyctl secrets set url=https://sitename.fly.dev
  6. siriokun revised this gist Sep 24, 2022. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions ghost.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    flyctl launch --name sitename --image=ghost:5.14.2-alpine --region cdg --no-deploy
    flyctl volumes create data --region cdg --size 1
    ## change fly.toml above
    flyctl secrets set url=https://sitename.fly.dev
    flyctl secrets set -a sitename NODE_ENV=development
    fly secrets set database__connection__filename=/var/lib/ghost/content/data/ghost-dev.db
    flyctl deploy
  7. siriokun revised this gist Sep 24, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ghost.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    flyctl launch --name sitename --image=ghost:5.14.2-alpine --region cdg --no-deploy
    flyctl volumes create data --region cdg --size 1
    ## change fly.toml below
    ## change fly.toml above
    flyctl deploy
  8. siriokun created this gist Sep 24, 2022.
    8 changes: 8 additions & 0 deletions fly.toml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    [env]
    url = "https://sitename.fly.dev"
    [mounts]
    source="data"
    destination="/var/lib/ghost/content"
    [[services]]
    http_checks = []
    internal_port = 2368
    4 changes: 4 additions & 0 deletions ghost.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    flyctl launch --name sitename --image=ghost:5.14.2-alpine --region cdg --no-deploy
    flyctl volumes create data --region cdg --size 1
    ## change fly.toml below
    flyctl deploy