0

I have the official postgres image running as a docker container, as well as the official redmine 3.3.1 container linked to the postgres container. All my data is being persisted and Redmine appears to be working fine, with one exception.

I have no way of adding issues within Redmine. I have the modules enabled and my user has manager, dev, and reporter roles and perms. I've also added admin to the user, but still a no go.

I suspect this problem has something to do with using Docker containers since I don't have the issue when running directly on the file system (no containers).

Thoughts?

Edit: (adding commands)

docker run -d --name postgres \
    -v /home/me/redmine/postgresql:/var/lib/postgresql/data \
    -e POSTGRES_DB=redmine \
    -e POSTGRES_USER=redmine \
    -e POSTGRES_PASSWORD=secret postgres

docker run -d -p 3000:3000 --name redmine \
    -v /home/me/redmine/files:/usr/src/redmine/files \
    --link postgres:postgres redmine
Ender
  • 1,652
  • 2
  • 25
  • 50
  • Could you post please the commands you are using to run the containers? Also if you have a Dockerfile. Regards – Carlos Rafael Ramirez Oct 22 '16 at 03:02
  • @CarlosRafaelRamirez - Added. As far as the Dockerfile goes, I'm just using official images from Docker hub. – Ender Oct 22 '16 at 04:17
  • Try changing the host mounted volumes to named volumes in order to discard permission issue. Ex: /home/me/redmine/postgresql by postgresql in the - v option of both – Carlos Rafael Ramirez Oct 22 '16 at 05:01
  • Are you sure you're not just missing the default configuration? Do you have at least one tracker, one status, one priority, one role, and a workflow set up? What's the error message you're getting? – jan Oct 22 '16 at 08:36
  • @Jan - I'm not getting error messages. Just don't see a way to input new issues. Yes, I have all those. – Ender Oct 23 '16 at 01:04
  • @CarlosRafaelRamirez - still trying to get named volumes working if that's the case. But doesn't this put the data inside a container? I think I really want my data in a directory on the host so that it's accessible when the container is not running. – Ender Oct 23 '16 at 01:04
  • Yes but first let's find where the error is. Named volumes is a directory in the host but it doesn't map to a directory you specify. `docker run -d -p 3000:3000 --name redmine -v files:/usr/src/redmine/files --link postgres:postgres redmine` – Carlos Rafael Ramirez Oct 23 '16 at 01:25
  • So that is now the command I use to start redmine, but I see no changes in how it's running. It runs, but still no way to add new issues. One thing I notice about permissions is that owner to all files recursively under /home/me/redmine is 999. I changed the owner and groups to my user using recursively, but this also made no difference. – Ender Oct 23 '16 at 02:20

1 Answers1

1

Redmine has no notion of the underlying infrastructure, so if the "new issue" button isn't shown, that has nothing to do with missing write permissions on the file system or database level, for instance.

If you can login, then your Redmine has already successfully performed database UPDATEs, and creating an issue does not need anything else, so you'd be looking in the wrong place when checking your Docker config.

I am almost certain you're missing permissions or a default configuration (e.g. issue statuses, issue priorities, roles, trackers, workflows, etc.), as mentioned in my comment above.

I am assuming you don't have any relevant data yet in your Redmine database. If that's the case, please try the following.

WARNING: This deletes all Redmine data.

  • export RAILS_ENV=production - set the environment assuming that your Docker image is built for a production Redmine, otherwise try development.
  • bundle exec rake db:drop - delete the database
  • bundle exec rake db:create - recreate an empty database
  • bundle exec rake db:migrate - recreate the schema
  • bundle exec rake redmine:load_default_data - this is the crucial part which I suspect has been missed last time, it creates all necessary objects required to successfully work with your Redmine, e.g. create issues!
jan
  • 1,160
  • 1
  • 9
  • 11
  • I've started up the redmine and postgres container instances to try what you have. However, it's not like I can just cd to the app root directory. These are run within a container, so I can't exec these commands and expect them to make changes to layers in containers (at least, not that I know how to do yet). I.e., $ bundle exec rake db:drop = Could not locate Gemfile or .bundle/ directory – Ender Oct 26 '16 at 03:04
  • 1
    I went back and rechecked what you said about having at least one tracker, status, priority, role, workflow ... I've never had to manually go in and select the projects within each tracker before. My other installations just work. Anyways, I did that and now it's working. Thanks. – Ender Oct 26 '16 at 03:21