Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@

/config/credentials/*.key
.DS_Store
.kamal
7 changes: 7 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
fizzy:
build:
context: .
env_file: .env
ports:
- 3000:3000
22 changes: 13 additions & 9 deletions config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ image: fizzy
# Where to deploy fizzy
servers:
web:
- fizzy.example.com # Set your server name here
hosts:
- 3.233.189.168
options:
memory: 512m

# How you connect to your server
ssh:
user: root # If you use a different username to SSH to your server, specify it here
user: ubuntu

# Automatic SSL
proxy:
ssl: true # Set this to false if you *don't* want SSL
host: fizzy.example.com # Set your server name here to use automatic SSL
ssl: true
host: fizzy.cedarcode.dev

# Your application configuration (secrets come from .kamal/secrets).
env:
Expand All @@ -28,18 +31,19 @@ env:
- SMTP_USERNAME
- SMTP_PASSWORD
clear:
BASE_URL: https://fizzy.example.com # The public URL of your Fizzy instance
MAILER_FROM_ADDRESS: support@example.com # The email "from" address that Fizzy sends email from
SMTP_ADDRESS: mail.example.com # The SMTP server you'll use to send email
BASE_URL: https://fizzy.cedarcode.dev # The public URL of your Fizzy instance
MAILER_FROM_ADDRESS: federico.bana@cedarcode.com
SMTP_ADDRESS: smtp.gmail.com
MULTI_TENANT: false # Set to true to allow multiple accounts to sign up
SOLID_QUEUE_IN_PUMA: true # Run background jobs in the app container


#-- General configuration --#

# Use a local registry to deploy
registry:
server: localhost:5555
server: 864100757851.dkr.ecr.us-east-1.amazonaws.com
username: AWS
password: <%= %x(aws ecr get-login-password).strip %>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: is the strip needed?

Suggested change
password: <%= %x(aws ecr get-login-password).strip %>
password: <%= %x(aws ecr get-login-password)%>


# Handy aliases for interacting with your deployment. For eaxmple: `bin/kamal console` will connect to a
# Rails console in production.
Expand Down
3 changes: 2 additions & 1 deletion config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
# worker per CPU, 1 thread per worker and tune it from there.
#
# https://edgeguides.rubyonrails.org/tuning_performance_for_deployment.html#puma
workers Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
# workers Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
workers Integer(ENV.fetch("WEB_CONCURRENCY") { 1 })
Comment on lines +31 to +32
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tbh honest I'd try to avoid changing this only because of the memory limitations of the server. If anything, we a slightly bigger instance we will be good

threads 1, 1

# Tell the Ruby VM that we're finished booting up.
Expand Down