diff --git a/config/deploy.production.yml b/config/deploy.production.yml index 8e1243ab6..8aa8fdd32 100644 --- a/config/deploy.production.yml +++ b/config/deploy.production.yml @@ -2,13 +2,10 @@ servers: web: hosts: - fizzy-app-101 + - fizzy-app-102 jobs: hosts: - fizzy-app-101 - web-replica: - hosts: - - fizzy-app-102 - proxy: true proxy: ssl: false @@ -20,34 +17,23 @@ env: clear: RAILS_ENV: production -x-beamer-accessory: &beamer-accessory - image: basecamp/beamer:vfs - registry: - server: registry.37signals.com - username: robot$harbor-bot - password: - - BASECAMP_REGISTRY_PASSWORD - options: - user: 1000 # Match the UID of the Rails app, for volume permissions - volumes: - - fizzy:/storage - - accessories: - beamer-primary: - <<: *beamer-accessory - service: beamer-primary - cmd: beamer primary --remove-after=1h --dir=/storage --disable-tls - port: 5000:80 - roles: - - web - - beamer-replica: - <<: *beamer-accessory - service: beamer-replica - cmd: beamer replica --primary=http://fizzy-app-101:5000/ --dir=/storage - roles: - - web-replica + beamer: + image: basecamp/beamer:vfs + registry: + server: registry.37signals.com + username: robot$harbor-bot + password: + - BASECAMP_REGISTRY_PASSWORD + options: + user: 1000 # Match the UID of the Rails app, for volume permissions + volumes: + - fizzy:/home/beamer + cmd: beamer run --retention=1h + port: 5001:5001 + hosts: + - fizzy-app-101 + - fizzy-app-102 load-balancer: image: basecamp/kamal-proxy:lb diff --git a/config/deploy.staging.yml b/config/deploy.staging.yml index 36b719e29..b93da7a58 100644 --- a/config/deploy.staging.yml +++ b/config/deploy.staging.yml @@ -2,13 +2,10 @@ servers: web: hosts: - fizzy-staging-app-01 + - fizzy-staging-app-101 jobs: hosts: - fizzy-staging-app-01 - web-replica: - hosts: - - fizzy-staging-app-101 - proxy: true proxy: ssl: false @@ -20,34 +17,23 @@ env: clear: RAILS_ENV: staging -x-beamer-accessory: &beamer-accessory - image: basecamp/beamer:vfs - registry: - server: registry.37signals.com - username: robot$harbor-bot - password: - - BASECAMP_REGISTRY_PASSWORD - options: - user: 1000 # Match the UID of the Rails app, for volume permissions - volumes: - - fizzy:/storage - - accessories: - beamer-primary: - <<: *beamer-accessory - service: beamer-primary - cmd: beamer primary --remove-after=1h --dir=/storage --disable-tls - port: 5000:80 - roles: - - web - - beamer-replica: - <<: *beamer-accessory - service: beamer-replica - cmd: beamer replica --primary=http://fizzy-staging-app-01:5000/ --dir=/storage - roles: - - web-replica + beamer: + image: basecamp/beamer:vfs + registry: + server: registry.37signals.com + username: robot$harbor-bot + password: + - BASECAMP_REGISTRY_PASSWORD + options: + user: 1000 # Match the UID of the Rails app, for volume permissions + volumes: + - fizzy:/home/beamer + cmd: beamer run --retention=1h + port: 5001:5001 + hosts: + - fizzy-staging-app-01 + - fizzy-staging-app-101 load-balancer: image: basecamp/kamal-proxy:lb diff --git a/config/deploy.yml b/config/deploy.yml index 482211870..19e9649ea 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -14,7 +14,7 @@ proxy: registry: server: registry.37signals.com username: robot$harbor-bot - password: + password: - BASECAMP_REGISTRY_PASSWORD builder: @@ -31,3 +31,4 @@ env: aliases: console: app exec -i --reuse "bin/rails console" ssh: app exec -i --reuse /bin/bash + switch: accessory exec beamer --reuse "beamer switch --primary=<%= ENV["PRIMARY"] %>"