Created
November 21, 2019 15:30
-
-
Save kuju63/e3b03666e7bc7a5c76ca2c5d6f2c76e4 to your computer and use it in GitHub Desktop.
Running redmine under the NGINX reverse proxy on Docker.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require ::File.expand_path('../config/environment', __FILE__) | |
map ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do | |
run Rails.application | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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