-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.yml
122 lines (104 loc) · 3.33 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Name of your application. Used to uniquely configure containers.
service: untitled-staging
# Name of the container image.
image: tristandunn/untitled
# Deploy to these servers.
servers:
web:
- 45.55.255.86
# job:
# hosts:
# - 192.168.0.1
# cmd: bin/jobs
# Enable SSL auto certification via Let's Encrypt and allow for multiple
# applications on one server.
proxy:
ssl: true
# host: untitled-staging.tristandunn.com
healthcheck:
path: /health
# Credentials for your image host.
registry:
# Specify the registry server, if you're not using Docker Hub.
# server: registry.digitalocean.com / ghcr.io / ...
server: ghcr.io
username: tristandunn
# Always use an access token rather than real password when possible.
password:
- KAMAL_REGISTRY_PASSWORD
# Inject ENV variables into containers. The secrets come from the
# .kamal/secrets file.
env:
secret:
- SECRET_KEY_BASE
clear:
# Run the Solid Queue Supervisor inside the web server's Puma process to do
# jobs. When you start using multiple servers, you should split out job
# processing to a dedicated machine.
SOLID_QUEUE_IN_PUMA: true
# Set number of processes dedicated to Solid Queue. Defaults to 1.
# JOB_CONCURRENCY: 3
# Set number of cores available to the application on each server.
# Defaults to 1.
# WEB_CONCURRENCY: 2
# Match this to any external database server to configure Active
# Record correctly.
# DB_HOST: 192.168.0.2
# Log everything from Rails.
# RAILS_LOG_LEVEL: debug
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments
# on invocation, where "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"
dbc: app exec --interactive --reuse "bin/rails dbconsole"
logs: app logs -f
shell: app exec --interactive --reuse "bash"
# 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:
- "untitled_storage:/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: amd64
cache:
type: gha
# # Building an image via remote server can be useful for faster AMD64 builds
# on ARM64 computers.
# remote: ssh://docker@docker-builder-server
# # Pass arguments and secrets to the Docker build process.
# args:
# RUBY_VERSION: ruby-3.3.6
# secrets:
# - GITHUB_TOKEN
# - RAILS_MASTER_KEY
# Use a different ssh user than root.
# ssh:
# user: app
# Use accessory services with secrets coming from the .kamal/secrets file.
# accessories:
# db:
# image: mysql:8.0
# host: 192.168.0.2
# port: 3306
# env:
# clear:
# MYSQL_ROOT_HOST: '%'
# secret:
# - MYSQL_ROOT_PASSWORD
# files:
# - config/mysql/production.cnf:/etc/mysql/my.cnf
# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
# directories:
# - data:/var/lib/mysql
# redis:
# image: redis:7.0
# host: 192.168.0.2
# port: 6379
# directories:
# - data:/data