Created
December 27, 2023 17:43
-
-
Save virolea/aee8c3d7b56d69df0fab230dc96b5e19 to your computer and use it in GitHub Desktop.
Example kamal deploy.yml file for a standard Rails setup on Digital Ocean
This file contains 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
# Name of your application. Used to uniquely configure containers. | |
service: your-app-name | |
# Name of the container image. | |
image: your-org/your-app-name | |
# Deploy to these servers. | |
servers: | |
web: | |
- REPLACE_WITH_YOUR_WEB_DROPLET_IP | |
job: | |
hosts: | |
- REPLACE_WITH_YOUR_JOB_DROPLET_IP | |
cmd: bundle exec rake solid_queue:start | |
# Credentials for your image host. | |
registry: | |
# Specify the registry server, if you're not using Docker Hub | |
server: registry.digitalocean.com/name-of-your-registry | |
username: your-do-email | |
# Always use an access token rather than real password when possible. | |
password: | |
- KAMAL_REGISTRY_PASSWORD | |
# Inject ENV variables into containers (secrets come from .env). | |
# Remember to run `kamal env push` after making changes! | |
env: | |
secret: | |
- RAILS_MASTER_KEY | |
- DATABASE_URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment