1
1
# Name of your application. Used to uniquely configure containers.
2
- service : my-app
2
+ service : wave
3
3
4
- # Name of the container image.
5
- image : my-user/my-app
4
+ # Name of the container image. Change ronald2wing to your username
5
+ image : ronald2wing/wave
6
6
7
7
# Deploy to these servers.
8
8
servers :
9
+ cron :
10
+ cmd : php /var/www/html/artisan schedule:work
11
+ hosts :
12
+ - <%= ENV['SSH_HOST'] %>
13
+ options :
14
+ health-cmd : pgrep -f "php artisan schedule:work" || exit 1
15
+ network : private
9
16
web :
10
- - 192.168.0.1
17
+ hosts :
18
+ - <%= ENV['SSH_HOST'] %>
19
+ options :
20
+ network : private
11
21
# job:
12
22
# hosts:
13
23
# - 192.168.0.1
@@ -18,16 +28,18 @@ servers:
18
28
#
19
29
# Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption.
20
30
proxy :
31
+ app_port : 8080
32
+ host : <%= ENV['PROD_HOST'] %>
21
33
ssl : true
22
- host : app.example.com
23
34
# Proxy connects to your container on port 80 by default.
24
35
# app_port: 3000
25
36
26
37
# Credentials for your image host.
27
38
registry :
28
39
# Specify the registry server, if you're not using Docker Hub
29
40
# server: registry.digitalocean.com / ghcr.io / ...
30
- username : my-user
41
+ # Change ronald2wing to your username
42
+ username : ronald2wing
31
43
32
44
# Always use an access token rather than real password (pulled from .kamal/secrets).
33
45
password :
@@ -47,12 +59,30 @@ builder:
47
59
# DB_HOST: 192.168.0.2
48
60
# secret:
49
61
# - RAILS_MASTER_KEY
62
+ env :
63
+ clear :
64
+ APP_DEBUG : false
65
+ APP_ENV : production
66
+ APP_NAME : Wave
67
+ APP_URL : https://<%= ENV['PROD_HOST'] %>
68
+ DB_CONNECTION : mysql
69
+ DB_DATABASE : wave_production
70
+ DB_HOST : wave-db
71
+ DB_USERNAME : wave
72
+ REDIS_HOST : wave-redis
73
+ SESSION_DRIVER : redis
74
+ secret :
75
+ - APP_KEY
76
+ - DB_PASSWORD
50
77
51
78
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
52
79
# "bin/kamal app logs -r job" will tail logs from the first server in the job section.
53
80
#
54
81
# aliases:
55
82
# shell: app exec --interactive --reuse "bash"
83
+ aliases :
84
+ shell : app exec --interactive --reuse "bash"
85
+ tinker : app exec --interactive --reuse "php artisan tinker"
56
86
57
87
# Use a different ssh user than root
58
88
#
@@ -69,6 +99,7 @@ builder:
69
99
# version inside the asset_path.
70
100
#
71
101
# asset_path: /app/public/assets
102
+ asset_path : /var/www/html/public/build
72
103
73
104
# Configure rolling deploys by setting a wait time between batches of restarts.
74
105
#
@@ -99,3 +130,47 @@ builder:
99
130
# port: 6379
100
131
# directories:
101
132
# - data:/data
133
+ accessories :
134
+ db :
135
+ directories :
136
+ - data:/var/lib/mysql
137
+ env :
138
+ clear :
139
+ MYSQL_DATABASE : wave_production
140
+ MYSQL_PASSWORD : <%= ENV['DB_PASSWORD'] %>
141
+ MYSQL_ROOT_PASSWORD : <%= ENV['DB_PASSWORD'] %>
142
+ MYSQL_USER : wave
143
+ host : <%= ENV['SSH_HOST'] %>
144
+ image : mysql:9.3
145
+ options :
146
+ network : private
147
+ db_backup :
148
+ env :
149
+ clear :
150
+ AWS_BUCKET_NAME : wave
151
+ AWS_DEFAULT_REGION : us-east-1
152
+ DB_DUMP_INCLUDE : wave_production
153
+ DB_DUMP_RETENTION : 30d
154
+ DB_DUMP_TARGET : s3://wave/backups/
155
+ DB_NAME : wave_production
156
+ DB_PASS : <%= ENV['DB_PASSWORD'] %>
157
+ DB_RESTORE_TARGET : s3://wave/backups/
158
+ DB_SERVER : wave-db
159
+ DB_USER : wave
160
+ SINGLE_DATABASE : true
161
+ secret :
162
+ - AWS_ACCESS_KEY_ID
163
+ - AWS_SECRET_ACCESS_KEY
164
+ host : <%= ENV['SSH_HOST'] %>
165
+ image : databack/mysql-backup:1.2.2
166
+ options :
167
+ network : private
168
+ volumes :
169
+ - backup-data:/db
170
+ redis :
171
+ directories :
172
+ - redis-data:/data
173
+ host : <%= ENV['SSH_HOST'] %>
174
+ image : valkey/valkey:8.1.1
175
+ options :
176
+ network : private
0 commit comments