-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
302 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
group :development do | ||
guard :falcon, port: 9292 do | ||
watch('Gemfile.lock') | ||
watch('config.ru') | ||
watch(%r{^config/.*}) | ||
|
||
notification :off | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
def environment | ||
require_relative 'config/environment' | ||
end | ||
|
||
# Prepare the application for start/restart. | ||
def deploy | ||
# This task is typiclly run after the site is updated but before the server is restarted. | ||
end | ||
|
||
# Restart the application server. | ||
def restart | ||
call 'falcon:supervisor:restart' | ||
end | ||
|
||
# Start the development server. | ||
def default | ||
call 'utopia:development' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env rackup | ||
# frozen_string_literal: true | ||
|
||
require_relative 'config/environment' | ||
|
||
require 'financier/middleware' | ||
|
||
Financier::Middleware.call(self, utopia: UTOPIA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Utopia Config | ||
|
||
This directory contains `environment.rb` which is used to initialize the running environment for tasks and servers. | ||
|
||
## Setting Environment Variables | ||
|
||
If you wish to set environment variables on a per-deployment basis, you can do so by creating an `config/environment.yaml` and populating it with key-value pairs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'bundler/setup' | ||
Bundler.setup | ||
|
||
require 'utopia/setup' | ||
UTOPIA ||= Utopia.setup | ||
|
||
require_relative '../db/environment' | ||
|
||
require 'financier' | ||
require 'json' | ||
|
||
require 'time/zone' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
UTOPIA_SESSION_SECRET: example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
require 'variant' | ||
require 'relaxo' | ||
require 'console' | ||
|
||
module Financier | ||
DATABASE_PATH = File.join(__dir__, Variant.for(:database).to_s) | ||
|
||
# Configure the database connection: | ||
DB = Relaxo.connect(DATABASE_PATH, logger: Console.logger) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env -S falcon host | ||
# frozen_string_literal: true | ||
|
||
load :rack, :lets_encrypt_tls, :supervisor | ||
|
||
hostname = File.basename(__dir__) | ||
rack hostname, :lets_encrypt_tls | ||
|
||
supervisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
PATH | ||
remote: .. | ||
specs: | ||
financier (0.1.0) | ||
bcrypt (~> 3.0) | ||
latinum (~> 1.3) | ||
markly | ||
ofx (~> 0.3) | ||
periodical (~> 1.0) | ||
qif (~> 1.1) | ||
relaxo (~> 1.3) | ||
relaxo-model (~> 0.19) | ||
time-zone (~> 1.1) | ||
trenni-formatters | ||
trenni-sanitize | ||
tty-prompt | ||
utopia (~> 2.18) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
async (1.30.1) | ||
console (~> 1.10) | ||
nio4r (~> 2.3) | ||
timers (~> 4.1) | ||
async-container (0.16.12) | ||
async | ||
async-io | ||
async-http (0.56.5) | ||
async (>= 1.25) | ||
async-io (>= 1.28) | ||
async-pool (>= 0.2) | ||
protocol-http (~> 0.22.0) | ||
protocol-http1 (~> 0.14.0) | ||
protocol-http2 (~> 0.14.0) | ||
async-http-cache (0.4.2) | ||
async-http (~> 0.56) | ||
async-io (1.32.2) | ||
async | ||
async-pool (0.3.8) | ||
async (>= 1.25) | ||
bake (0.16.1) | ||
samovar (~> 2.1) | ||
bcrypt (3.1.16) | ||
build-environment (1.13.0) | ||
coderay (1.1.3) | ||
concurrent-ruby (1.1.9) | ||
console (1.13.1) | ||
fiber-local | ||
falcon (0.39.2) | ||
async | ||
async-container (~> 0.16.0) | ||
async-http (~> 0.56.0) | ||
async-http-cache (~> 0.4.0) | ||
async-io (~> 1.22) | ||
build-environment (~> 1.13) | ||
bundler | ||
localhost (~> 1.1) | ||
process-metrics (~> 0.2.0) | ||
rack (>= 1.0) | ||
samovar (~> 2.1) | ||
ffi (1.15.4) | ||
fiber-local (1.0.0) | ||
formatador (0.3.0) | ||
guard (2.18.0) | ||
formatador (>= 0.2.4) | ||
listen (>= 2.7, < 4.0) | ||
lumberjack (>= 1.0.12, < 2.0) | ||
nenv (~> 0.1) | ||
notiffany (~> 0.0) | ||
pry (>= 0.13.0) | ||
shellany (~> 0.0) | ||
thor (>= 0.18.1) | ||
guard-compat (1.2.1) | ||
guard-falcon (0.12.1) | ||
async-container (~> 0.16.0) | ||
falcon (~> 0.35) | ||
guard | ||
guard-compat (~> 1.2) | ||
http-accept (2.1.1) | ||
latinum (1.7.1) | ||
listen (3.7.0) | ||
rb-fsevent (~> 0.10, >= 0.10.3) | ||
rb-inotify (~> 0.9, >= 0.9.10) | ||
localhost (1.1.8) | ||
lumberjack (1.2.8) | ||
mail (2.7.1) | ||
mini_mime (>= 0.1.1) | ||
mapping (1.1.1) | ||
markly (0.6.1) | ||
method_source (1.0.0) | ||
mime-types (3.3.1) | ||
mime-types-data (~> 3.2015) | ||
mime-types-data (3.2021.0901) | ||
mini_mime (1.1.1) | ||
mini_portile2 (2.6.1) | ||
msgpack (1.4.2) | ||
nenv (0.3.0) | ||
nio4r (2.5.8) | ||
nokogiri (1.12.4) | ||
mini_portile2 (~> 2.6.1) | ||
racc (~> 1.4) | ||
notiffany (0.1.3) | ||
nenv (~> 0.1) | ||
shellany (~> 0.0) | ||
ofx (0.3.2) | ||
nokogiri | ||
pastel (0.8.0) | ||
tty-color (~> 0.5) | ||
periodical (1.2.0) | ||
process-metrics (0.2.1) | ||
console (~> 1.8) | ||
samovar (~> 2.1) | ||
protocol-hpack (1.4.2) | ||
protocol-http (0.22.5) | ||
protocol-http1 (0.14.2) | ||
protocol-http (~> 0.22) | ||
protocol-http2 (0.14.2) | ||
protocol-hpack (~> 1.4) | ||
protocol-http (~> 0.18) | ||
pry (0.14.1) | ||
coderay (~> 1.1) | ||
method_source (~> 1.0) | ||
qif (1.2.0) | ||
racc (1.5.2) | ||
rack (2.2.3) | ||
rake (13.0.6) | ||
rake-compiler (1.1.1) | ||
rake | ||
rb-fsevent (0.11.0) | ||
rb-inotify (0.10.1) | ||
ffi (~> 1.0) | ||
relaxo (1.6.2) | ||
console | ||
rugged | ||
relaxo-model (0.19.0) | ||
msgpack (~> 1.0) | ||
relaxo (~> 1.5) | ||
rugged (1.1.1) | ||
samovar (2.1.4) | ||
console (~> 1.0) | ||
mapping (~> 1.0) | ||
shellany (0.0.1) | ||
thor (1.1.0) | ||
thread-local (1.1.0) | ||
time-zone (1.2.0) | ||
timers (4.3.3) | ||
trenni (3.13.1) | ||
rake-compiler | ||
trenni-formatters (2.13.1) | ||
mapping (~> 1.1) | ||
trenni (~> 3.12) | ||
trenni-sanitize (0.6.1) | ||
trenni (~> 3.5) | ||
tty-color (0.6.0) | ||
tty-cursor (0.7.1) | ||
tty-prompt (0.23.1) | ||
pastel (~> 0.8) | ||
tty-reader (~> 0.8) | ||
tty-reader (0.9.0) | ||
tty-cursor (~> 0.7) | ||
tty-screen (~> 0.8) | ||
wisper (~> 2.0) | ||
tty-screen (0.8.1) | ||
utopia (2.18.5) | ||
concurrent-ruby (~> 1.0) | ||
console (~> 1.0) | ||
http-accept (~> 2.1) | ||
mail (~> 2.6) | ||
mime-types (~> 3.0) | ||
msgpack | ||
rack (~> 2.2) | ||
samovar (~> 2.1) | ||
trenni (~> 3.0) | ||
variant (~> 0.1) | ||
variant (0.1.1) | ||
thread-local | ||
wisper (2.0.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bake | ||
falcon | ||
financier! | ||
guard | ||
guard-falcon | ||
|
||
BUNDLED WITH | ||
2.2.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
group :preload do | ||
gem "bake" | ||
|
||
gem "financier", git: "https://github.com/oriontransfer/financier" | ||
# gem "financier", path: "../" | ||
end | ||
|
||
group :production do | ||
gem 'falcon' | ||
end | ||
|
||
group :development do | ||
gem 'guard' | ||
gem 'guard-falcon' | ||
end |