# Name of your application. Used to uniquely configure containers. service: csa-admin # Name of the container image. image: csa-admin # Deploy to these servers. servers: web: - isle.thibaud.gg job: hosts: - isle.thibaud.gg cmd: bin/jobs # Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server. # Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer. # # Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption. proxy: ssl: true forward_headers: true response_timeout: 100 hosts: # Static hosts - cdn.csa-admin.org - mc.csa-admin.org - query.csa-admin.org - inbound.csa-admin.org - connect.csa-admin.org # Tenant hosts <% tenant = YAML.load_file("#{Dir.pwd}/config/tenant.yml", aliases: true) tenant["production"].flat_map { |name, config| [ config["admin_host"], config["members_host"] ] }.compact.each do |host| %> - <%= host %> <% end %> # Registry is where your images are kept. registry: server: localhost:5555 # Inject ENV variables into containers (secrets come from .kamal/secrets). env: secret: - RAILS_MASTER_KEY clear: APP_DOMAIN: csa-admin.org ASSET_HOST: https://cdn.csa-admin.org ULTRA_ADMIN_EMAIL: info@csa-admin.org SUPPORT_EMAIL: support@csa-admin.org SUPPORT_EXTRA_EMAILS: thibaud@thibaud.gg ULTRA_ADMIN_NAME: Thibaud ULTRA_ADMIN_LANGUAGE: fr MAINTENANCE_MODE: OFF WEB_CONCURRENCY: 3 JOB_CONCURRENCY: 1 LOG_REQUESTS: false CAP_API_URL: https://cap.csa-admin.org CAP_INTERNAL_API_URL: http://csa-admin-cap:3000 accessories: cap-valkey: image: valkey/valkey:9-alpine host: isle.thibaud.gg directories: - cap-valkey-data:/data cmd: "valkey-server --save 60 1 --loglevel warning --maxmemory-policy noeviction" cap: image: tiago2/cap:3.1.17 host: isle.thibaud.gg env: clear: REDIS_URL: redis://csa-admin-cap-valkey:6379 RATELIMIT_IP_HEADER: cf-connecting-ip ENABLE_ASSETS_SERVER: "true" WIDGET_VERSION: "0.1.58" WASM_VERSION: "0.0.8" secret: - ADMIN_KEY directories: - cap-data:/usr/src/app/data proxy: ssl: true host: cap.csa-admin.org app_port: 3000 forward_headers: true healthcheck: path: /health # Aliases are triggered with "bin/kamal ". You can overwrite arguments on invocation: # "bin/kamal logs -r job" will tail logs from the first server in the job section. aliases: console: app exec --interactive --reuse "bin/rails console" shell: app exec --interactive --reuse "bash" logs: app logs -f -n 100 migrate: app exec -r web "bin/rails db:migrate" restart: app boot cap-valkey-boot: accessory boot cap-valkey cap-boot: accessory boot cap cap-logs: accessory logs cap -f # Use a persistent storage volume for sqlite database files and local Active Storage files. # Recommended to change this to a mounted volume path that is backed up off server. volumes: - "/storage/csa-admin:/rails/storage" # Bridge fingerprinted assets, like JS and CSS, between versions to avoid # hitting 404 on in-flight requests. Combines all files from new and old # version inside the asset_path. asset_path: /rails/public/assets # Configure the image builder. builder: arch: arm64