[docker] redmine 구축하기

docker-compose.yml 작성
https://github.com/jisung87kr/docker-redmine

version: '3.2'

services:

  redmine:
    image: redmine
    restart: always
    ports:
      - 8080:3000
    environment:
      REDMINE_DB_MYSQL: db
      REDMINE_DB_PASSWORD: PASSWORD
      REDMINE_SECRET_KEY_BASE: supersecretkey
    
  db:
    image: mysql:5.7
    restart: always
    ports:
     - 3330:3306
    environment:
      MYSQL_ROOT_PASSWORD: PASSWORD
      MYSQL_DATABASE: redmine 
    volumes:
     - db_data:/var/lib/mysql
    command: #문자셋 지정
     - --character-set-server=utf8mb4
     - --collation-server=utf8mb4_unicode_ci

volumes:
  db_data:

포트개방

docker-comse.yml 에서 지정한 포트가 개방되어 있어야 한다.

apache 설정

<VirtualHost *:80>
  ServerName redmine.ujsstudio.com
  #ProxyRequests Off
  #ProxyPreserveHost On
  ProxyPass / http://localhost:8888/
  ProxyPassReverse / http://localhost:8888/
</VirtualHost>

역프록시 설정을 해서 지정한 포트로 리다이렉트 처리

참고