I am trying to build a docker-compose file for the development of a dotcms site.
I have the following in my docker-compose.yml:
version: "3"
services:
dotcms:
image: openjdk
command: /app/bin/startup.sh run
ports:
- 8080:8080
volumes:
- ./:/app
depends_on:
- db
db:
image: mysql
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0 --lower_case_table_names=1
volumes:
- ./db:/var/lib/mysql
ports:
- 3308:3306
environment:
MYSQL_ROOT_PASSWORD: dotcms
MYSQL_DATABASE: dotcms
MYSQL_USER: dotcms
MYSQL_PASSWORD: dotcms
after running docker-compose up
When I try to load localhost:8080
I get a 500 error. I look in the dotcms database
and there is a table called db_version
however that is all there is. No other tables are created.
I have tried deleting the dotcms
database and recreating then running docker-compose up
once again, but I get the same issue.
I have also tried deleting the ./db
folder (the mounted volume for the mysql
database) and rerunning, again same issue.
Update
I have updated the dotcms
container to run: command: sh -c "sleep 30 && /app/bin/startup.sh run"
I also added --general_log=1 --general_log_file=/var/log/mysql/query.log
to the db
command
I deleted the local db
folder and ran docker-composer
up again.
Still getting the same results. Here are the logs:
dotcms.log: https://pastebin.com/5WnrarK8
catalina.log: https://pastebin.com/Z3vHbnp2
localhost.log: https://pastebin.com/S2CSPqxQ
from the db
container
mysql.error.log: https://pastebin.com/4bYwB2Z2
mysql.query.log: https://pastebin.com/maDUXFm5
(This query file was very large, I removed everything before the first entry showing: mysql-connector-java-5.1.37
docker logs <container id>
db.container.log: https://pastebin.com/Wz7aRhVc
dotcms.container.log: https://pastebin.com/qNVBfTpf