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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ node_modules/
# editor settings and extension recommendations
/.vscode/*
!/.vscode/extensions.json

# Ignore key files for decrypting credentials and more.
/config/credentials/*.key
4 changes: 3 additions & 1 deletion .kamal/secrets
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
# KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD

# Improve security by using a password manager. Never check config/master.key into git!
RAILS_MASTER_KEY=$(cat config/master.key)
RAILS_MASTER_KEY=$(cat config/credentials/production.key)

KAMAL_REGISTRY_PASSWORD=$(aws ecr get-login-password --region us-east-2)
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Application < Rails::Application
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[assets tasks])
config.autoload_lib(ignore: %w[assets tasks generators])

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.

Q: can we revert this now or is this still needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

A: I think it is still needed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Also I think we should discuss our options here, I have a couple ways we could improve this and I'm not sure which is best


# Configuration for the application, engines, and railties goes here.
#
Expand Down
1 change: 1 addition & 0 deletions config/credentials/production.yml.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
YRbgODceieITQZQ4gZ93Sc3FjtSxKAjbD3GXsuf8dNNAd2Spk0ygswjRuTmX7XOwC0fIY39YbvVujEm+molWhcT5pIjDWTfJ3a2SmZ9KNJ/yoI2AR+ZxC9snFLUBGM8qzLT2Z8dCVXdXz4UhL9Gv8hxfIfUuSsTvYewN4DRCwqjOhtIk6XEuAoUZ1jbYsi5X+SyhELsuIUQdeTsF4kzZr/snuHxpvvyWb8LZFjPOm7lRb/y682YCLhFb3cZTbOwtq9fBfJY5EwEBmasMxbGE5XJrGhxy8XCw9E9OY6WsGt+0xERcDoBkLuHyYpzEyD8WL/JMIGFA1Pp+6hMRIhoJA6Wq9fldsFoifEF7My3+sr6jPF+gh53u1V+9Fd4rdfPizzms/Zj2q3qvE0P4Def6c4bOEMA5DeVPW1d9jpVC5kf/8QwDyfa8A5tsYldkcBZ0TT7TwXTYMoSajYfv3Ns84ZxAxzuDpXbL7FJgozpIFQ+NPLiIFXzCDfUSrw==--i8jvjzgTiUXOf0Bi--1Hx7dqQgCMYZG1eKu83quw==
31 changes: 20 additions & 11 deletions config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image: endsideout
# Deploy to these servers.
servers:
web:
- 192.168.0.1
- 18.117.181.111
# job:
# hosts:
# - 192.168.0.1
Expand All @@ -22,19 +22,23 @@ servers:
#
# proxy:
# ssl: true
# host: app.example.com
# host: staging.endsideout.org

# Where you keep your container images.
registry:
# Alternatives: hub.docker.com / registry.digitalocean.com / ghcr.io / ...
server: localhost:5555
# We set up an ECR because
# - push/pull of images with kamal over SSH was not working over the RfG event wifi
# - it should be fairly inexpensive for our expected use (famous last AWS words, I suppose)
server: 024757002197.dkr.ecr.us-east-2.amazonaws.com
# server: localhost:5555

# Needed for authenticated registries.
# username: your-user
username: AWS

# Always use an access token rather than real password when possible.
# password:
# - KAMAL_REGISTRY_PASSWORD
password:
- KAMAL_REGISTRY_PASSWORD

# Inject ENV variables into containers (secrets come from .kamal/secrets).
env:
Expand Down Expand Up @@ -78,21 +82,26 @@ asset_path: /rails/public/assets

# Configure the image builder.
builder:
arch: amd64
arch:
- amd64
# - arm64


# # Build image via remote server (useful for faster amd64 builds on arm64 computers)
# remote: ssh://docker@docker-builder-server
#
# # Pass arguments and secrets to the Docker build process
# args:
# RUBY_VERSION: ruby-4.0.6
# secrets:
secrets:
# - GITHUB_TOKEN
# - RAILS_MASTER_KEY
- RAILS_MASTER_KEY

# Use a different ssh user than root
# ssh:
# user: app
ssh:
user: ec2-user
keys: ["~/.ssh/2026rfg-staging.pem"]


# Use accessory services (secrets come from .kamal/secrets).
# accessories:
Expand Down