Created
December 8, 2024 03:59
-
-
Save anchietajunior/c1f095f452aba37258e31b371fac06bd to your computer and use it in GitHub Desktop.
Deploy Rails app with Managed Database
This file contains hidden or 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
service: nice_project | |
image: joseanchieta/nice_project | |
servers: | |
web: | |
- 192.168.0.1 | |
registry: | |
username: joseanchieta | |
password: | |
- KAMAL_REGISTRY_PASSWORD | |
# Secrets come from .kamal/secrets. | |
env: | |
secret: | |
- RAILS_MASTER_KEY | |
- PRODUCTION_DB_HOST | |
- KAMAL_REGISTRY_PASSWORD | |
clear: | |
SOLID_QUEUE_IN_PUMA: true | |
# IP or address of the database service, this is an example using | |
# Digital Ocean | |
# In database.yml >> production you should have something like this: | |
# production: | |
# adapter: postgresql | |
# encoding: unicode | |
# pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
# database: production_database_name | |
# url: <%= ENV["PRODUCTION_DB_HOST"] %> | |
DB_HOST: db-postgresql-nyc3-something123.ondigitalocean.com | |
aliases: | |
console: app exec --interactive --reuse "bin/rails console" | |
shell: app exec --interactive --reuse "bash" | |
logs: app logs -f | |
dbc: app exec --interactive --reuse "bin/rails dbconsole" | |
volumes: | |
- "nice_project:/rails/storage" | |
asset_path: /rails/public/assets | |
builder: | |
arch: amd64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment