-
Notifications
You must be signed in to change notification settings - Fork 174
Pre-create /home/redmine and set wide permissions on it #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Alternatively, you can use |
This fixes the errors of
version: "3"
services:
db:
image: postgres:10.6
restart: always
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=redmine
- POSTGRES_PASSWORD=password
redmine:
image: infosiftr/temp-redmine:3.4
restart: always
ports:
- "3000:3000"
volumes:
- ./data/redmine:/usr/src/redmine/files
environment:
- REDMINE_DB_POSTGRES=db
- REDMINE_DB_USERNAME=redmine
- REDMINE_DB_PASSWORD=password
user: 1002:1002 $ docker-compose up -d
$ docker logs redmine-138_redmine_1
. . .
== 20170419144536 AddViewMessagesToAllExistingRoles: migrating ================
== 20170419144536 AddViewMessagesToAllExistingRoles: migrated (0.0060s) =======
[2018-11-14 22:46:02] INFO WEBrick 1.3.1
[2018-11-14 22:46:02] INFO ruby 2.4.5 (2018-10-18) [x86_64-linux]
[2018-11-14 22:46:02] INFO WEBrick::HTTPServer#start: pid=1 port=3000
$ docker-compose down
Stopping redmine-138_db_1 ... done
Stopping redmine-138_redmine_1 ... done
Removing redmine-138_db_1 ... done
Removing redmine-138_redmine_1 ... done
Removing network redmine-138_default
$ docker-compose up -d
Creating network "redmine-138_default" with the default driver
Creating redmine-138_db_1 ... done
Creating redmine-138_redmine_1 ... done
$ docker logs redmine-138_redmine_1
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The Gemfile's dependencies are satisfied
[2018-11-14 22:50:09] INFO WEBrick 1.3.1
[2018-11-14 22:50:09] INFO ruby 2.4.5 (2018-10-18) [x86_64-linux]
[2018-11-14 22:50:09] INFO WEBrick::HTTPServer#start: pid=1 port=3000 |
I have a similar problem with secrets: version: '3.7'
services:
web:
image: redmine:3.4.6-passenger
restart: always
command: passenger start --ssl --ssl-certificate /run/secrets/ssl-certificate --ssl-certificate-key /run/secrets/ssl-key --ssl-port 3443
environment:
REDMINE_DB_MYSQL_FILE: /run/secrets/database-hostname
REDMINE_DB_DATABASE_FILE: /run/secrets/database-name
REDMINE_DB_USERNAME_FILE: /run/secrets/database-username
REDMINE_DB_PASSWORD_FILE: /run/secrets/database-password
REDMINE_PLUGINS_MIGRATE: 1
ports:
- '80:3000'
- '443:3443'
depends_on:
- database
secrets:
- source: redmine-configuration
target: /usr/src/redmine/config/configuration.yml
- ssl-certificate
- ssl-key
- database-hostname
- database-username
- database-password
- database-name The error is:
I think we need to add a variable like Should I start another issue for this? EDIT: I found that one trick is to mount the configuration using a volume instead of using a secret, but that is a bit ugly. |
@Silex, the real solution is to either mount the secret with the correct user ( |
@yosifkit: right, good idea thanks! |
For information using @tianon: your image does not seem to work by me:
Here's the full service definition: web:
image: infosiftr/temp-redmine:3.4
#user: 'redmine:redmine'
command: passenger start --ssl --ssl-certificate /run/secrets/ssl-certificate --ssl-certificate-key /run/secrets/ssl-key --ssl-port 3443
environment:
REDMINE_DB_MYSQL_FILE: /run/secrets/database-hostname
REDMINE_DB_DATABASE_FILE: /run/secrets/database-name
REDMINE_DB_USERNAME_FILE: /run/secrets/database-username
REDMINE_DB_PASSWORD_FILE: /run/secrets/database-password
REDMINE_PLUGINS_MIGRATE: 1
ports:
- '80:3000'
- '443:3443'
secrets:
- source: redmine-configuration
target: /usr/src/redmine/config/configuration.yml
- ssl-certificate
- ssl-key
- database-hostname
- database-username
- database-password
- database-name
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/files:/usr/src/redmine/files
- ./data/logs:/usr/src/redmine/log
- ./initializers:/usr/src/redmine/config/initializers/customization
- ./plugins:/usr/src/redmine/plugins
- ./themes:/usr/src/redmine/public/themes If I comment the line with the plugins then things work with the official image, but with your image I have this error:
|
web_1_56cc1eb6c7e5 | [FATAL tini (37)] exec passenger failed: No such file or directory This is because the image I pushed does not contain If commenting out your I think this fix is still correct and important since it fixes the more common error in #137 and #138, and we should investigate your failures around |
(Re-opened #137 to continue the |
- `elasticsearch`: 6.5.1 - `ghost`: 2.6.1 - `irssi`: `gpg --batch` (jessfraz/irssi#21) - `joomla`: joomla-docker/docker-joomla#69 - `kibana`: 6.5.1 - `logstash`: 6.5.1 - `mariadb`: 10.3.11 - `matomo`: 3.7.0 - `openjdk`: 12-ea+20, windowsservercore-1803 for jdk8 - `redmine`: arbitrary user fixes (docker-library/redmine#141, docker-library/redmine#142) - `tomcat`: 7.0.92
- `elasticsearch`: 6.5.1 - `ghost`: 2.6.1 - `irssi`: `gpg --batch` (jessfraz/irssi#21) - `joomla`: joomla-docker/docker-joomla#69 - `kibana`: 6.5.1 - `logstash`: 6.5.1 - `mariadb`: 10.3.11 - `matomo`: 3.7.0 - `openjdk`: 12-ea+20, windowsservercore-1803 for jdk8 - `redmine`: arbitrary user fixes (docker-library/redmine#141, docker-library/redmine#142) - `tomcat`: 7.0.92
This should fix #138, and might fix #137 -- more testing required (not 100% sure we've completely reproduced all the failure modes we're seeing in #137, especially around
/usr/local/bundle/config
).@wglambert what's the easiest way for me to help you test this and make sure it fixes at least the things you managed to reproduce? Do you need me to push it somewhere, or can you build it from here?
I guess realistically, anyone looking to help test this should be able to do so with something like this:
$ docker build --pull -t redmine:3.4 https://github.com/infosiftr/redmine.git#home-redmine:3.4
(and then use that now-locally-built
redmine:3.4
image in yourdocker-compose.yml
, etc.)