Comments (16)
@b-a-t will do.
from docker-redmine.
VOLUME please
from docker-redmine.
I also wanted to ask for the ability to mount /var/log as a volume from outside. Correct me, if I'm wrong - that would imply, that in /app/init we need to (re)create sub-directories with-in /var/log and set proper permissions on them.
from docker-redmine.
@elderone Its difficult to VOLUME mount /var/log. However I will make sure /var/log/redmine can be volume mounted.
from docker-redmine.
@b-a-t It would be a headache to handle volume mounting /var/log. re-creating required directories and correcting their permissions would be terrible.
from docker-redmine.
@b-a-t @elderone I will give it a shot though. From first glance looks like only /var/log/nginx
, /var/log/supervisor
and /var/log/redmine
would need to be handled. I am not sure though.
from docker-redmine.
@sameersbn /var/log/redmine is very nice!
@b-a-t docker cp sameersbn/redmine:/var/log .
from docker-redmine.
I'm really new to docker(basically, only last week spent on making docker-redmine to fit my needs:)) so, possibly I'm not clear with what [VOLUME] does. What I want to be able to do is to launch application like:
docker run -v /var/log:/var/log ...
and get redmine and related logs on the hosting server(or, in another container with elastic-search). From that prospective I'd expect /app/init
just to be on a safe side to issue smth. like:
mkdir -p /var/log/redmine && chmod 0755 /var/log/redmine && chown redmine:redmine /var/log/redmine
And the same for nginx/ and supervisor/ with the exception that they should be happy with default root:root.
Again, I'm new to this, so maybe I'm missing some core obstacle.
from docker-redmine.
While we are on permissions, I think, this should also be fixed:
drwxr-x--- 2 www-data adm 4096 Oct 16 22:54 /var/log/nginx
We start nginx as root
and then setuid to redmine
- at no step we are www-data
. So, I'd suggest to chown redmine /var/log/nginx
to be consistent. /var/lib/nginx
seems to be OK already:
ls -l /var/lib/nginx
total 20
drwx------ 2 redmine root 4096 Oct 16 22:54 body
drwx------ 2 redmine root 4096 Oct 16 22:54 fastcgi
drwx------ 2 redmine root 4096 Oct 16 22:54 proxy
drwx------ 2 redmine root 4096 Oct 16 22:54 scgi
drwx------ 2 redmine root 4096 Oct 16 22:54 uwsgi
Not sure, maybe dpkg-statoverride --add redmine adm 0750 /var/log/nginx
before adding nginx
would be better idea..
from docker-redmine.
I am thinking of collecting all the logs in /var/log/redmine. The following logs are of interest to us:
redmine:
- production.log
- unicorn.stdout.log
- unicorn.stderr.log
nginx:
- redmine_access.log
- redmine_error.log
supervisor:
- cron.log
- nginx.log
- supervisord.log
- unicorn.log
I intend to collect these at the following subdirs
- /var/log/redmine/redmine
- /var/log/redmine/nginx
- /var/log/redmine/supervisor
The user will be able to volume mount the /var/log/redmine/
directory.
Using this scheme we can create a data container for all the redmine logs,
docker run -it --name=redmine-logs_data \
-v /opt/redmine/logs:/var/log/redmine \
busybox true
And then import the logs volume into the redmine container like so,
docker run -it --name redmine [options] \
--volumes-from=redmine-logs_data \
sameersbn/redmine:latest
Now if you wanted to pump out these logs to logstash, all you would need to do is import the logs volume into your logstash container.
from docker-redmine.
great! thank you!
from docker-redmine.
Thanks a lot, seems to work fine!
from docker-redmine.
Sorry for bothering you with this one again. I've just noticed, that supervisord.log
still remains in /var/log/supervisor
. Can you, please, also move it into /var/log/redmine/supervisor
?
Also access.log
and error.log
remain in /var/log/nginx
. Not sure, how useful they are, but for consistency...
from docker-redmine.
@b-a-t I did not think supervisord.log would be of any use. But no problem, I will move it.
The nginx access.log and error.log will always be empty, you will never have any logs in them.
from docker-redmine.
@sameersbn Thanks a lot! supervisord.log
is handy, when trying to figure out why something goes wrong. Was helpful to me, when nginx didn't start due not expanded REDMINE_HTTPS_HSTS_MAXAGE
.
from docker-redmine.
@b-a-t supervisord.log
and the nginx access and error logs have now been moved to the logs volume.
from docker-redmine.
Related Issues (20)
- Multiple problems on rebuilding the redmine image HOT 3
- Upgrade from 5.1.0 to 5.1.1-1 rake aborted HOT 9
- postgresql container fails to start and report error: popen failure: unable to allocate memory initdb: error: The program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/14/bin/initdb". HOT 2
- How to upgrade from sameersbn/redmine: 4.1.1-8 to sameersbn/redmine: 5.1.1-1 ? HOT 5
- redmine:5.1.1-1 ocker-compose up error HOT 3
- An error occurred while sending mail HOT 10
- Can't download large files HOT 4
- Build is failing HOT 4
- Run sameersbn/redmine with an External Azure MySQL database HOT 2
- 5.1.1-4 dies because of Matrix in gem HOT 7
- MOving back from 5.1.1 to 5.0.7 HOT 1
- Bug: github workflow should only tag "latest" for changes to master branch HOT 2
- Failed: Upgrade from 5.0.7 -> 5.1.2 on Synology Docker HOT 4
- ERROR 1193 (HY000) at line 1: Unknown system variable 'tx_isolation' with a MySQL DB version 8.1 HOT 5
- Container is not able to connect to the internet using the bridge network on Synology DSM 7.2 HOT 9
- IMAP email job not working in 5.1.2+ HOT 6
- container "redmine-mysql-1" does not start with docker v26.0.2 and works with 26.0.1 ... ? HOT 3
- Invalid form authenticity token error HOT 11
- Internet is not ready when plugin installing and rubygems update is required
- Permission to create databases is required to run against an existing Postgres database HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-redmine.