Skip to content

Commit f9c6f89

Browse files
Uriel AlonsoUriel Alonso
authored andcommitted
Update Kamal deploy config
1 parent b68f4d6 commit f9c6f89

File tree

1 file changed

+15
-105
lines changed

1 file changed

+15
-105
lines changed

config/deploy.yml

Lines changed: 15 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,29 @@
1-
# Name of your application. Used to uniquely configure containers.
21
service: spec_driven_app
32

4-
# Name of the container image (use your-user/app-name on external registries).
5-
image: spec_driven_app
3+
image: ghcr.io/apperph/github-actions-test
64

7-
# Deploy to these servers.
85
servers:
96
web:
10-
- 192.168.0.1
11-
# job:
12-
# hosts:
13-
# - 192.168.0.1
14-
# cmd: bin/jobs
7+
- rails-test-lightsail
158

16-
# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
17-
# If used with Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption.
18-
#
19-
# Using an SSL proxy like this requires turning on config.assume_ssl and config.force_ssl in production.rb!
20-
#
21-
# Don't use this when deploying to multiple web servers (then you have to terminate SSL at your load balancer).
22-
#
23-
# proxy:
24-
# ssl: true
25-
# host: app.example.com
9+
proxy:
10+
ssl: false
11+
host: 52.77.159.239
2612

27-
# Where you keep your container images.
2813
registry:
29-
# Alternatives: hub.docker.com / registry.digitalocean.com / ghcr.io / ...
30-
server: localhost:5555
14+
server: ghcr.io
15+
username: apperph
16+
password:
17+
- KAMAL_REGISTRY_PASSWORD
3118

32-
# Needed for authenticated registries.
33-
# username: your-user
34-
35-
# Always use an access token rather than real password when possible.
36-
# password:
37-
# - KAMAL_REGISTRY_PASSWORD
19+
builder:
20+
arch: amd64
3821

39-
# Inject ENV variables into containers (secrets come from .kamal/secrets).
4022
env:
23+
clear:
24+
RAILS_ENV: production
4125
secret:
4226
- RAILS_MASTER_KEY
43-
clear:
44-
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
45-
# When you start using multiple servers, you should split out job processing to a dedicated machine.
46-
SOLID_QUEUE_IN_PUMA: true
47-
48-
# Set number of processes dedicated to Solid Queue (default: 1)
49-
# JOB_CONCURRENCY: 3
50-
51-
# Set number of cores available to the application on each server (default: 1).
52-
# WEB_CONCURRENCY: 2
53-
54-
# Match this to any external database server to configure Active Record correctly
55-
# Use spec_driven_app-db for a db accessory server on same machine via local kamal docker network.
56-
# DB_HOST: 192.168.0.2
57-
58-
# Log everything from Rails
59-
# RAILS_LOG_LEVEL: debug
60-
61-
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
62-
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
63-
aliases:
64-
console: app exec --interactive --reuse "bin/rails console"
65-
shell: app exec --interactive --reuse "bash"
66-
logs: app logs -f
67-
dbc: app exec --interactive --reuse "bin/rails dbconsole --include-password"
68-
69-
# Use a persistent storage volume for sqlite database files and local Active Storage files.
70-
# Recommended to change this to a mounted volume path that is backed up off server.
71-
volumes:
72-
- "spec_driven_app_storage:/rails/storage"
73-
74-
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
75-
# hitting 404 on in-flight requests. Combines all files from new and old
76-
# version inside the asset_path.
77-
asset_path: /rails/public/assets
78-
79-
# Configure the image builder.
80-
builder:
81-
arch: amd64
82-
83-
# # Build image via remote server (useful for faster amd64 builds on arm64 computers)
84-
# remote: ssh://docker@docker-builder-server
85-
#
86-
# # Pass arguments and secrets to the Docker build process
87-
# args:
88-
# RUBY_VERSION: 3.3.6
89-
# secrets:
90-
# - GITHUB_TOKEN
91-
# - RAILS_MASTER_KEY
92-
93-
# Use a different ssh user than root
94-
# ssh:
95-
# user: app
9627

97-
# Use accessory services (secrets come from .kamal/secrets).
98-
# accessories:
99-
# db:
100-
# image: mysql:8.0
101-
# host: 192.168.0.2
102-
# # Change to 3306 to expose port to the world instead of just local network.
103-
# port: "127.0.0.1:3306:3306"
104-
# env:
105-
# clear:
106-
# MYSQL_ROOT_HOST: '%'
107-
# secret:
108-
# - MYSQL_ROOT_PASSWORD
109-
# files:
110-
# - config/mysql/production.cnf:/etc/mysql/my.cnf
111-
# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
112-
# directories:
113-
# - data:/var/lib/mysql
114-
# redis:
115-
# image: valkey/valkey:8
116-
# host: 192.168.0.2
117-
# port: 6379
118-
# directories:
119-
# - data:/data
28+
ssh:
29+
user: ubuntu

0 commit comments

Comments
 (0)