File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed
Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ services:
77 - 3306
88 volumes :
99 - mysql-data:/var/lib/mysql
10+ - ./docker/mysql/charset.cnf:/etc/mysql/conf.d/charset.cnf:ro
1011 - ./db/init:/docker-entrypoint-initdb.d
1112 environment :
1213 MYSQL_ALLOW_EMPTY_PASSWORD : 1
@@ -31,34 +32,20 @@ services:
3132 # If you prefer traditional keys, set DB_* in .env and configure database.yml accordingly.
3233 RAILS_ENV : development
3334 RAILS_LOG_TO_STDOUT : " true"
34- VITE_RUBY_HOST : vite
35- DATABASE_URL : trilogy://root@database:3306/
35+ DATABASE_URL : trilogy://root@database:3306/?encoding=utf8mb4&collation=utf8mb4_unicode_ci&variables[collation_connection]=utf8mb4_unicode_ci
36+
3637 ports :
3738 - 3000:3000
3839 volumes :
3940 - ./:/app:cached
4041 - /app/tmp
42+ working_dir : /app
4143
4244 command : bash -lc "bin/rails s -b 0.0.0.0 -p 3000"
4345 tty : true
4446 stdin_open : true
4547 restart : unless-stopped
4648
47- vite :
48- build :
49- context : .
50- dockerfile : Dockerfile.dev
51- env_file : .env
52- environment :
53- RAILS_ENV : development
54- RAILS_LOG_TO_STDOUT : " true"
55- VITE_RUBY_HOST : 0.0.0.0
56- volumes :
57- - ./:/app:cached
58- - /app/tmp
59- command : bin/vite dev
60- ports :
61- - 3036:3036
6249
6350 prod :
6451 profiles :
Original file line number Diff line number Diff line change 1+ [mysqld]
2+ character-set-server = utf8mb4
3+ collation-server = utf8mb4_unicode_ci
You can’t perform that action at this time.
0 commit comments