[Rails] Site internet de la World Tartiflette Tour.
1
# Name of your application. Used to uniquely configure containers.
2
service: wtt
3
4
# Name of the container image.
5
image: blendoit/wtt
6
7
# Deploy to these servers.
8
servers:
9
web:
10
- 192.162.71.223
11
# job:
12
# hosts:
13
# - 192.168.0.1
14
# cmd: bin/jobs
15
16
# Enable SSL auto certification via Let's Encrypt and allow for multiple apps on a single web server.
17
# Remove this section when using multiple web servers and ensure you terminate SSL at your load balancer.
18
#
19
# Note: If using Cloudflare, set encryption mode in SSL/TLS setting to "Full" to enable CF-to-app encryption.
20
proxy:
21
ssl: true
22
host: wtt.mlnp.fr
23
24
# Credentials for your image host.
25
registry:
26
# Specify the registry server, if you're not using Docker Hub
27
# server: registry.digitalocean.com / ghcr.io / ...
28
username: blendoit
29
30
# Always use an access token rather than real password when possible.
31
password:
32
- KAMAL_REGISTRY_PASSWORD
33
34
# Inject ENV variables into containers (secrets come from .kamal/secrets).
35
env:
36
secret:
37
- RAILS_MASTER_KEY
38
clear:
39
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
40
# When you start using multiple servers, you should split out job processing to a dedicated machine.
41
SOLID_QUEUE_IN_PUMA: true
42
43
# Set number of processes dedicated to Solid Queue (default: 1)
44
# JOB_CONCURRENCY: 3
45
46
# Set number of cores available to the application on each server (default: 1).
47
# WEB_CONCURRENCY: 2
48
49
# Match this to any external database server to configure Active Record correctly
50
# Use wtt-db for a db accessory server on same machine via local kamal docker network.
51
# DB_HOST: 192.168.0.2
52
53
# Log everything from Rails
54
# RAILS_LOG_LEVEL: debug
55
56
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
57
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
58
aliases:
59
console: app exec --interactive --reuse "bin/rails console"
60
shell: app exec --interactive --reuse "bash"
61
logs: app logs -f
62
dbc: app exec --interactive --reuse "bin/rails dbconsole"
63
64
65
# Use a persistent storage volume for sqlite database files and local Active Storage files.
66
# Recommended to change this to a mounted volume path that is backed up off server.
67
volumes:
68
- "wtt_storage:/rails/storage"
69
70
71
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
72
# hitting 404 on in-flight requests. Combines all files from new and old
73
# version inside the asset_path.
74
asset_path: /rails/public/assets
75
76
# Configure the image builder.
77
builder:
78
arch: amd64
79
80
# # Build image via remote server (useful for faster amd64 builds on arm64 computers)
81
# remote: ssh://docker@docker-builder-server
82
#
83
# # Pass arguments and secrets to the Docker build process
84
# args:
85
# RUBY_VERSION: ruby-3.3.6
86
# secrets:
87
# - GITHUB_TOKEN
88
# - RAILS_MASTER_KEY
89
90
# Use a different ssh user than root
91
ssh:
92
user: mpeter
93
94
# Use accessory services (secrets come from .kamal/secrets).
95
# accessories:
96
# db:
97
# image: mysql:8.0
98
# host: 192.168.0.2
99
# # Change to 3306 to expose port to the world instead of just local network.
100
# port: "127.0.0.1:3306:3306"
101
# env:
102
# clear:
103
# MYSQL_ROOT_HOST: '%'
104
# secret:
105
# - MYSQL_ROOT_PASSWORD
106
# files:
107
# - config/mysql/production.cnf:/etc/mysql/my.cnf
108
# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
109
# directories:
110
# - data:/var/lib/mysql
111
# redis:
112
# image: redis:7.0
113
# host: 192.168.0.2
114
# port: 6379
115
# directories:
116
# - data:/data
117