Skip to content

Instantly share code, notes, and snippets.

@kuju63

kuju63/Dockerfile

Created Nov 21, 2019
Embed
What would you like to do?
Running redmine under the NGINX reverse proxy on Docker.
require ::File.expand_path('../config/environment', __FILE__)
map ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do
run Rails.application
end
upstream redmine_back {
server redmine:3000;
}
server {
location /redmine/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host;
proxy_pass http://redmine_back/redmine/;
proxy_redirect default;
}
}
version: '3'
services:
redmine:
build:
context: ./redmine
dockerfile: Dockerfile
environment:
RAILS_RELATIVE_URL_ROOT: '/redmine'
web-proxy:
image: nginx:1.17-alpine
volumes:
- ./web-proxy/default.conf:/etc/nginx/conf.d/default.conf
links:
- redmine
ports:
- 80:80
FROM redmine:4.0.5-alpine
COPY --chown=redmine:redmine config.ru config.ru
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment