Skip to content

Commit

Permalink
wip: deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
datagutt committed Oct 14, 2024
1 parent c4edba5 commit 50ac9d5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 60 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
92 changes: 32 additions & 60 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,70 +1,42 @@
##
# FLY SETTINGS - onetime redis (2024-04-29)
# fly.toml app configuration file generated for pricething-redis on 2024-10-14T18:31:44+02:00
#
# CONNECTIONS
#
# All Fly Apps within an organization are connected on the
# private 6PN network and available to each other as
# `APPNAME.internal`. For redis, connect to:
#
# redis://:[email protected]:6379
#
# Note: the leading colon before the password is important
# and without it redis will throw a NOAUTH exception. It's
# the basic auth separator between username:password.
#
# e.g. redis://username:password@hostname:6379
#
# A blank username means the password will be authenticated
# against the default redis-server password (i.e. REDIS_PASSWORD).
# Without the colon, the single password value is assumed
# to be the username.
#
#
# SETUP
#
# Run this once to create and prepare the Fly App for
# deployment:
#
# $ fly apps create ots-staging-redis --org onetime
# $ read -s redispass
# $ fly secrets set REDIS_PASSWORD=$redispass
# $ fly volumes create redis_staging
# $ fly deploy
#
# After that, run deploy any time this fly.toml config
# or the docker image is updated.
#
# $ fly deploy
#
#
# COMMANDS:
#
# $ fly machine list
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "pricething-redis"
app = 'pricething-redis'
primary_region = 'arn'

[build]

# fly volumes fork vol_v8me5jq3ojnm9g7r -r ams
# fly scale count 0 --region sea
# fly scale count 1 -- region ams
primary_region = 'arn' # fly platform regions
[[mounts]]
source = 'redis_server'
destination = '/data'

[http_service]
internal_port = 6379
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[mounts]
destination = "/data"
source = "redis_server"
[[services]]
protocol = 'tcp'
internal_port = 6379
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0

[metrics]
port = 9091
path = "/metrics"
[[services.ports]]
port = 10000

# Use the Docker image instead of building from source
[[services.tcp_checks]]
interval = '10s'
timeout = '2s'

#[build]
#image = "flyio/redis:6.2.6"
[[vm]]
size = 'shared-cpu-1x'

[vm]
size = "shared-cpu-1x"
memory = "256mb"
cpus = 1
[[metrics]]
port = 9091
path = '/metrics'

0 comments on commit 50ac9d5

Please sign in to comment.