搭建Redmine

搭建Redmine

编辑docker-compose.yml文件

1
2
3
4
5
6
7
8
9
10
11
redmine:
image: redmine
external_links:
- mysql:mysql
ports:
- 3000:3000
environment:
- REDMINE_DB_MYSQL:mysql
- REDMINE_DB_PASSWORD:数据库密码
volumes:
- /home/xuchao/ymls/redmine/files:/usr/src/redmine/files

编辑nginx代理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 0.0.0.0:80;
server_name redmine.yenole.com;

client_max_body_size 100m;

location / {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_buffers 8 8k;
proxy_buffer_size 32k;
proxy_busy_buffers_size 32k;

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Frame-Options SAMEORIGIN;

proxy_pass http://127.0.0.1:3000;
}
}

常用命令

  • 启动服务:docker-compose up -d
  • 销毁服务:docker-compose down
  • 重启服务:docker-compose restart