Skip to content

Commit

Permalink
Set up deploys on fly (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
mapra99 authored Dec 30, 2023
1 parent 320a552 commit 78c8b79
Show file tree
Hide file tree
Showing 9 changed files with 147,580 additions and 7 deletions.
147,529 changes: 147,529 additions & 0 deletions .yarn/releases/yarn-1.22.19.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


yarn-path ".yarn/releases/yarn-1.22.19.cjs"
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data'

gem "dockerfile-rails", ">= 1.6", :group => :development
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ GEM
diff-lcs (1.4.4)
digest (3.1.0)
docile (1.4.0)
dockerfile-rails (1.6.1)
rails (>= 3.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
Expand Down Expand Up @@ -157,6 +159,8 @@ GEM
timeout
netrc (0.11.0)
nio4r (2.5.9)
nokogiri (1.14.3-aarch64-linux)
racc (~> 1.4)
nokogiri (1.14.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-darwin)
Expand Down Expand Up @@ -323,6 +327,7 @@ GEM
zeitwerk (2.6.7)

PLATFORMS
aarch64-linux
arm64-darwin-21
arm64-darwin-22
x86_64-darwin-20
Expand All @@ -332,6 +337,7 @@ DEPENDENCIES
bootsnap (>= 1.4.4)
byebug
devise (~> 4.8.0)
dockerfile-rails (>= 1.6)
dotenv-rails (~> 2.7.6)
factory_bot_rails (~> 6.1.0)
faker (~> 2.17.0)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Invoicy is a platform for freelancers to easily build invoices and send them to

## Live Demo

[Live Demo Link](https://invoicy.fly.dev/)
[Live Demo Link](https://demo.invoicy.lat/)
[See here our components library](https://invoicy-storybook.vercel.app/?path=/story/components-button--default)


Expand Down Expand Up @@ -52,7 +52,7 @@ To get a local copy up and running follow these simple example steps.
```
3. Create a .env file based on the existing .env.sample file_
```bash
cp .env.example .env
cp .env.sample .env
```
4. Follow the instructions on the .env file regarding the vendors variables that need to be configure
5. Set up the database
Expand Down
5 changes: 5 additions & 0 deletions bin/docker-entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

# Add any container initialization steps here

exec "${@}"
9 changes: 9 additions & 0 deletions config/dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# generated by dockerfile-rails

---
options:
label:
fly_launch_runtime: rails
postgresql: true
prepare: false
redis: true
22 changes: 19 additions & 3 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# fly.toml app configuration file generated for invoicy on 2023-04-30T19:46:49-05:00
# fly.toml app configuration file generated for invoicy-stg on 2023-12-30T02:25:14-05:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "invoicy"
primary_region = "bog"
app = "invoicy-stg"
primary_region = "sjc"
kill_signal = "SIGINT"
kill_timeout = "5s"
console_command = "/rails/bin/rails console"

[experimental]
auto_rollback = true
Expand All @@ -15,6 +16,7 @@ kill_timeout = "5s"
[build.args]
BUILD_COMMAND = "bin/rails fly:build"
SERVER_COMMAND = "bin/rails fly:server"
REDIS_URL = "redis://redis:6379"

[deploy]
release_command = "bin/rails fly:release"
Expand All @@ -26,6 +28,14 @@ kill_timeout = "5s"
web = "bin/rails fly:server"
worker = "bin/rails fly:sidekiq"

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["web"]

[[services]]
protocol = "tcp"
internal_port = 8080
Expand All @@ -44,6 +54,12 @@ kill_timeout = "5s"
hard_limit = 25
soft_limit = 20

[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 1024
processes = ["web", "worker"]

[[statics]]
guest_path = "/app/public"
url_prefix = "/"
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@
},
"engines": {
"node": "16.x"
}
}
},
"packageManager": "[email protected]"
}

1 comment on commit 78c8b79

@vercel
Copy link

@vercel vercel bot commented on 78c8b79 Dec 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

invoicy-storybook – ./

invoicy-storybook-git-main-mapra99.vercel.app
invoicy-storybook-mapra99.vercel.app
invoicy-storybook.vercel.app

Please sign in to comment.