Skip to content

Commit

Permalink
More app setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jbirdjavi committed Dec 16, 2024
1 parent 7578fd1 commit d886776
Show file tree
Hide file tree
Showing 22 changed files with 428 additions and 188 deletions.
52 changes: 52 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# APP CONFIGS
PORT=3000
SESSION_SECRET=fake
OKTA_ISSUER="https://signon.okta.com/oauth2/default"
OKTA_CLIENT_ID=fake
OKTA_CLIENT_SECRET=fake
OKTA_GROUP_ID=fake
OKTA_GROUP_NAME=fake
APP_BASE_URL="https://localhost:3000"
APP_PORT=3000
LOGIN_REDIRECT_URI="https://localhost:3000/authcallback"

# LIGHTSPEED CONFIGS
LIGHTSPEED_AUTH_REQUEST_URL=fake
LIGHTSPEED_API_ROOT=fake
LIGHTSPEED_API_AUTH_ROOT=fake
LIGHTSPEED_API_SCOPES=fake
LIGHTSPEED_CLIENT_ID=fake
LIGHTSPEED_CLIENT_SECRET=fake
LIGHTSPEED_INITIAL_TOKEN=fake

# GOOGLE SERVICE ACCOUNT
GOOGLE_SERVICE_ACCOUNT_KEY=fake
GOOGLE_CLIENT_ID=fake
GOOGLE_CLIENT_SECRET=fake

# POSTGRES CONFIGS
PG_HOST=
PG_USER=
PG_PASS=

# WOOCOMMERCE CONFIGS
WOO_API_KEY=fake
WOO_API_SECRET=fake

# SALESFORCE CONFIGS
SF_INSTANCE_URL=fake
SF_LOGIN_URL=fake
SF_PASSWORD=fake
SF_TOKEN=fake
SF_USERNAME=fake
SF_VERSION=58.0

# RAILS CONFIGS
SECRET_KEY_BASE=fake-e44d2103b8a16cec8eefbb3945cc4371f2db4b0aba02ff40d8d89cef5e85fd0e2b1e6ddb5c53f921eb05d0e2c54779b9a0f1bb2fe2cc1ee2553181dc1b3b1b1e
DB_ENV_POSTGRESQL_DB=fl_pos_admin
DB_ENV_POSTGRESQL_USER=postgres
DB_ENV_POSTGRESQL_PASS=
DB_PORT_5432_TCP_ADDR=localhost
STORAGE_REDIS_DB_INDEX=1
STORAGE_REDIS_HOST=localhost
STORAGE_REDIS_PORT=6379
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Ignore bundler config.
/.bundle

# Ignore all environment files.
/.env*
# Ignore some environment files.
/.env*.local

# Ignore all logfiles and tempfiles.
/log/*
Expand Down
11 changes: 7 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "importmap-rails"
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
# gem "stimulus-rails"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
Expand Down Expand Up @@ -51,19 +51,22 @@ group :development do
gem "web-console"
end

gem "awesome_print"
gem "ddtrace", "~> 1.4"
gem "dogstatsd-ruby", "~> 5.3"
gem "amazing_print"
gem "ddtrace"
gem "dogstatsd-ruby"
gem "google-apis-sheets_v4"
gem "lograge"
gem "lightspeed_pos", github: "marketplacer/lightspeed_pos"
gem "marco-polo"
gem "ougai", "~> 1.7"
gem "redis"
gem "rollbar"
gem "omniauth-oktaoauth", github: "CruGlobal/omniauth-oktaoauth"
gem "omniauth-rails_csrf_protection", "~> 1.0"
gem "salesforce_bulk_api"
gem "sidekiq"
gem "sidekiq-cron"
gem "sidekiq-unique-jobs"
gem "woocommerce_api"
gem "httparty"

Expand Down
58 changes: 51 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ GEM
uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
amazing_print (1.6.0)
ast (2.4.2)
awesome_print (1.9.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
Expand Down Expand Up @@ -128,6 +128,7 @@ GEM
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
declarative (0.0.20)
diff-lcs (1.5.1)
dogstatsd-ruby (5.6.3)
dotenv (3.1.6)
Expand Down Expand Up @@ -160,12 +161,34 @@ GEM
raabro (~> 1.4)
globalid (1.2.1)
activesupport (>= 6.1)
google-apis-core (0.15.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 1.9)
httpclient (>= 2.8.3, < 3.a)
mini_mime (~> 1.0)
mutex_m
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
google-apis-sheets_v4 (0.39.0)
google-apis-core (>= 0.15.0, < 2.a)
google-cloud-env (2.2.1)
faraday (>= 1.0, < 3.a)
google-logging-utils (0.1.0)
googleauth (1.12.0)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
hashdiff (1.1.2)
hashie (5.0.0)
httparty (0.22.0)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
importmap-rails (2.0.3)
Expand Down Expand Up @@ -215,8 +238,10 @@ GEM
mini_mime (1.1.5)
minitest (5.25.4)
msgpack (1.7.5)
multi_json (1.15.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mutex_m (0.3.0)
net-http (0.6.0)
uri
net-imap (0.5.1)
Expand Down Expand Up @@ -261,6 +286,7 @@ GEM
omniauth-rails_csrf_protection (1.0.2)
actionpack (>= 4.2)
omniauth (~> 2.0)
os (1.1.4)
ostruct (0.6.1)
ougai (1.9.1)
oj (~> 3.10)
Expand Down Expand Up @@ -331,13 +357,20 @@ GEM
rake (13.2.1)
rdoc (6.9.0)
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.23.0)
connection_pool
regexp_parser (2.9.3)
reline (0.5.12)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
request_store (1.7.0)
rack (>= 1.4)
retriable (3.1.2)
rexml (3.3.9)
rollbar (3.6.0)
rspec-core (3.13.2)
Expand Down Expand Up @@ -387,6 +420,15 @@ GEM
fugit (~> 1.8, >= 1.11.1)
globalid (>= 1.0.1)
sidekiq (>= 6.5.0)
sidekiq-unique-jobs (8.0.10)
concurrent-ruby (~> 1.0, >= 1.0.5)
sidekiq (>= 7.0.0, < 8.0.0)
thor (>= 1.0, < 3.0)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
Expand All @@ -411,8 +453,6 @@ GEM
standard-performance (1.6.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.23.0)
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.1.2)
thor (1.3.2)
thruster (0.1.9)
Expand All @@ -421,11 +461,13 @@ GEM
thruster (0.1.9-x86_64-darwin)
thruster (0.1.9-x86_64-linux)
timeout (0.4.2)
trailblazer-option (0.1.2)
turbo-rails (2.0.11)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode (0.4.4.5)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
Expand Down Expand Up @@ -462,15 +504,16 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
awesome_print
amazing_print
bootsnap
brakeman
bundler-audit
ddtrace (~> 1.4)
ddtrace
debug
dogstatsd-ruby (~> 5.3)
dogstatsd-ruby
dotenv-rails
factory_bot_rails
google-apis-sheets_v4
httparty
importmap-rails
lightspeed_pos!
Expand All @@ -484,15 +527,16 @@ DEPENDENCIES
pry-rails
puma (>= 5.0)
rails (~> 8.0.1)
redis
rollbar
rspec-rails
salesforce_bulk_api
sidekiq
sidekiq-cron
sidekiq-unique-jobs
solid_cable
solid_cache
standard
stimulus-rails
thruster
turbo-rails
tzinfo-data
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/monitors_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class MonitorsController < ApplicationController
#skip_before_action :authenticate_user

def lb
render plain: "OK"
end
end
27 changes: 0 additions & 27 deletions bin/kamal

This file was deleted.

6 changes: 5 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

require_relative "../lib/log/logger"

module FlPosAdmin
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
Expand All @@ -38,6 +40,8 @@ class Application < Rails::Application

# Don't generate system test files.
config.generators.system_tests = nil

# Send all logs to stdout, which docker reads and sends to datadog.
config.logger = Log::Logger.new($stdout) unless Rails.env.test? # we don't need a logger in test env
end
end

Loading

0 comments on commit d886776

Please sign in to comment.