From 47d14cbdb3890a53e81c381667f4a2193c5a21a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Ba=C3=B1a?= Date: Mon, 4 May 2026 15:47:26 -0300 Subject: [PATCH 1/3] Simple compose.yml file. --- compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 compose.yml diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000000..75d79052c1 --- /dev/null +++ b/compose.yml @@ -0,0 +1,7 @@ +services: + fizzy: + build: + context: . + env_file: .env + ports: + - 3000:3000 From a7961c967f793a983ac969569bf217b6d3263373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Ba=C3=B1a?= Date: Tue, 5 May 2026 14:43:59 -0300 Subject: [PATCH 2/3] Basic deploy.yml to use with Kamal. --- config/deploy.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/config/deploy.yml b/config/deploy.yml index 5d2f52e019..1af99ae09a 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -8,16 +8,16 @@ image: fizzy # Where to deploy fizzy servers: web: - - fizzy.example.com # Set your server name here + - 3.233.189.168 # 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: @@ -28,8 +28,8 @@ 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 + BASE_URL: https://fizzy.cedarcode.dev # The public URL of your Fizzy instance + MAILER_FROM_ADDRESS: fizzy@cedarcode.dev # The email "from" address that Fizzy sends email from SMTP_ADDRESS: mail.example.com # The SMTP server you'll use to send email 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 @@ -37,9 +37,10 @@ env: #-- 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 %> # Handy aliases for interacting with your deployment. For eaxmple: `bin/kamal console` will connect to a # Rails console in production. From a21b5c37825fcd9821792c723a1d0501030353f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Ba=C3=B1a?= Date: Wed, 6 May 2026 09:42:32 -0300 Subject: [PATCH 3/3] Limited web concurrency for memory constrained environment. --- .gitignore | 1 + config/deploy.yml | 8 +++++--- config/puma.rb | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 38bd80d0df..3a0e7ddd97 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /config/credentials/*.key .DS_Store +.kamal diff --git a/config/deploy.yml b/config/deploy.yml index 5d2f52e019..64e160fac0 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -8,7 +8,9 @@ image: fizzy # Where to deploy fizzy servers: web: - - fizzy.example.com # Set your server name here + - 3.233.189.168 + options: + memory: 512m # How you connect to your server ssh: @@ -28,8 +30,8 @@ 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 + BASE_URL: https://fizzy.cedarcode.dev # The public URL of your Fizzy instance + MAILER_FROM_ADDRESS: federico.bana@cedarcode.com # The email "from" address that Fizzy sends email from SMTP_ADDRESS: mail.example.com # The SMTP server you'll use to send email 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 diff --git a/config/puma.rb b/config/puma.rb index d3e65c6710..077a7b90ad 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -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 }) threads 1, 1 # Tell the Ruby VM that we're finished booting up.