Reputation: 21
I am a noob with docker, and I try to implement a redmine+mysql container in Windows environment and add production mysql dump in it after that.
I have an issue when trying to access to redmine after my execution of sql script production dump, after sql launch I only have Internal error when browsing redmine with docker. I don't know how to change the database name in the data-compose file , if I replace 'redmine' with anything else my script is broken.
Also I don't know how I can access to redmine error logs folder in my docker to fix the issue.
Here is my docker-compose file :
version: '3.7'
services:
db:
image: mysql:5.5.47
restart: always
ports:
- 3306:3306
volumes:
- .\mysql_files\data-mysql:/var/lib/mysql
- .\mysql_files\backup-mysql:/var/lib/mysql/backup
- .\mysql_files\dump-mysql:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: monmdp
MYSQL_DATABASE: redmine
redmine:
image: redmine:4.0.3
restart: always
ports:
- 8080:3000
depends_on:
- db
volumes:
- .\redmine_files\files:/usr/local/redmine/files
- .\redmine_files\logs:/var/log/redmine
environment:
REDMINE_DB_MYSQL: db
REDMINE_DB_PASSWORD: monmdp
as you can see I tried to access to redmine log folder in this line :
- .\redmine_files\logs:/var/log/redmine
but the folder is still empty :(
expected result : can browse redmine with production data dump
current result : Can't browse redmine and can't access log folder to check what's wrong.
Thanks for your help
Upvotes: 2
Views: 3838
Reputation: 1
Regarding the Dockerfile for Redmine, log files won't be saved inside the container. Instead, they're set up to output directly to STDOUT.
echo 'config.logger = Logger.new(STDOUT)' > config/additional_environment.rb; # line 93
https://github.com/docker-library/redmine/blob/master/5.0/bookworm/Dockerfile
Upvotes: 0
Reputation: 6123
this docked image host redmine under /usr/src/redmine/ so you should use
- .\redmine_files\logs:/usr/src/redmine/log
Upvotes: 1
Reputation: 961
From what I understand, you are trying to access the logs of redmine container but you found the .\redmine_files\logs
directory empty. First, you need to check whether there are logs in the docker /var/log/redmine
directory or not. You can do so by running commands in redmine shell itself. Use the command docker exec -it redmine /bin/bash
to move to redmine shell and cd
to /var/log/redmine
to check if the logs are present there or not. If you don't find the logs there then that means that there was not logs to be replicated to ./redmine_files/logs
.
If you find the logs in /var/log/redmine
then there must be some issue with your docker-compose file, but it seems fine to me. Also, as @Mihai has suggested you can check the logs of redmine using the command sudo docker-compose logs redmine
to see if it is running properly or not.
Upvotes: 2