ぼざクリ タグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

117 lines
3.5 KiB

  1. # Name of your application. Used to uniquely configure containers.
  2. service: backend
  3. # Name of the container image.
  4. image: your-user/backend
  5. # Deploy to these servers.
  6. servers:
  7. web:
  8. - 192.168.0.1
  9. # job:
  10. # hosts:
  11. # - 192.168.0.1
  12. # cmd: bin/jobs
  13. # Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
  14. # Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer.
  15. #
  16. # Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption.
  17. proxy:
  18. ssl: true
  19. host: app.example.com
  20. # Credentials for your image host.
  21. registry:
  22. # Specify the registry server, if you're not using Docker Hub
  23. # server: registry.digitalocean.com / ghcr.io / ...
  24. username: your-user
  25. # Always use an access token rather than real password when possible.
  26. password:
  27. - KAMAL_REGISTRY_PASSWORD
  28. # Inject ENV variables into containers (secrets come from .kamal/secrets).
  29. env:
  30. secret:
  31. - RAILS_MASTER_KEY
  32. clear:
  33. # Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
  34. # When you start using multiple servers, you should split out job processing to a dedicated machine.
  35. SOLID_QUEUE_IN_PUMA: true
  36. # Set number of processes dedicated to Solid Queue (default: 1)
  37. # JOB_CONCURRENCY: 3
  38. # Set number of cores available to the application on each server (default: 1).
  39. # WEB_CONCURRENCY: 2
  40. # Match this to any external database server to configure Active Record correctly
  41. # Use backend-db for a db accessory server on same machine via local kamal docker network.
  42. # DB_HOST: 192.168.0.2
  43. # Log everything from Rails
  44. # RAILS_LOG_LEVEL: debug
  45. # Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
  46. # "bin/kamal logs -r job" will tail logs from the first server in the job section.
  47. aliases:
  48. console: app exec --interactive --reuse "bin/rails console"
  49. shell: app exec --interactive --reuse "bash"
  50. logs: app logs -f
  51. dbc: app exec --interactive --reuse "bin/rails dbconsole"
  52. # Use a persistent storage volume for sqlite database files and local Active Storage files.
  53. # Recommended to change this to a mounted volume path that is backed up off server.
  54. volumes:
  55. - "backend_storage:/rails/storage"
  56. # Bridge fingerprinted assets, like JS and CSS, between versions to avoid
  57. # hitting 404 on in-flight requests. Combines all files from new and old
  58. # version inside the asset_path.
  59. asset_path: /rails/public/assets
  60. # Configure the image builder.
  61. builder:
  62. arch: amd64
  63. # # Build image via remote server (useful for faster amd64 builds on arm64 computers)
  64. # remote: ssh://docker@docker-builder-server
  65. #
  66. # # Pass arguments and secrets to the Docker build process
  67. # args:
  68. # RUBY_VERSION: 3.2.2
  69. # secrets:
  70. # - GITHUB_TOKEN
  71. # - RAILS_MASTER_KEY
  72. # Use a different ssh user than root
  73. # ssh:
  74. # user: app
  75. # Use accessory services (secrets come from .kamal/secrets).
  76. # accessories:
  77. # db:
  78. # image: mysql:8.0
  79. # host: 192.168.0.2
  80. # # Change to 3306 to expose port to the world instead of just local network.
  81. # port: "127.0.0.1:3306:3306"
  82. # env:
  83. # clear:
  84. # MYSQL_ROOT_HOST: '%'
  85. # secret:
  86. # - MYSQL_ROOT_PASSWORD
  87. # files:
  88. # - config/mysql/production.cnf:/etc/mysql/my.cnf
  89. # - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
  90. # directories:
  91. # - data:/var/lib/mysql
  92. # redis:
  93. # image: redis:7.0
  94. # host: 192.168.0.2
  95. # port: 6379
  96. # directories:
  97. # - data:/data