$ docker run -d --name db_redmine -e MYSQL_ROOT_PASSWORD=example -e MYSQL_DATABASE=redmine mysql

$ docker start db_redmine

$ docker exec -it db_redmine bash

$ rm /etc/localtime

$ ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

$ docker stop db_redmine

$ docker start db_redmine

$ docker run -d --name site_redmine -p 3000:3000 --link db_redmine:mysql redmine

$ docker start site_redmine

$ docker exec -it site_redmine bash

$ pip3 install docker-compose

$ docker-compose --version

$ vi docker-compose.yml (failed)
---
version: '3.2'
services:
db_redmine:
image: mysql:latest
container_name: db_redmine
networks:
- redmine_network
volumes:
- /home/macubuntu/mysql/db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "example"
MYSQL_DATABASE: "redmine"
command:
[ "--character-set-server=utf8","--collation-server=utf8_unicode_ci" ]
site_redmin:
image: redmine:latest
container_name: site_redmine
networks:
- default
- redmine_network
links:
- db_redmine:mysql
ports:
- 3000:3000
volumes:
- /home/macubuntu/redmine/plugins:/usr/src/redmine/plugins
- /home/macubuntu/redmine/themes:/usr/src/redmine/public/themes
- /home/macubuntu/redmine/files:/usr/src/redmine/files
environment:
REDMINE_DB_MYSQL: 'redmine'
REDMINE_DB_PASSWORD: 'example'
REDMINE_PLUGINS_MIGRATE: 'true'
networks:
redmine_network:
---

$ vi docker-compose.yml (success)
---
version: '3.1'

services:
redmine:
image: redmine:latest
restart: always
container_name: redmine
networks:
- default
- redmine_network
ports:
- 3000:3000
environment:
REDMINE_DB_MYSQL: db
REDMINE_DB_PASSWORD: redmine
REDMINE_DB_DATABASE: redmine
REDMINE_DB_ENCODING: utf8
#REDMINE_NO_DB_MIGRATE: true
db:
image: mysql:latest
restart: always
container_name: mysql
networks:
- redmine_network
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: redmine
MYSQL_DATABASE: redmine
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
networks:
redmine_network:
---

$ docker stop db_redmine

$ docker stop site_redmine

$ docker rm <CONTAIN ID> <CONTAIN ID>

$ docker-compose up -d

$ docker-compose down

$ curl localhost:3000

$ curl 0.0.0.0:3000

# Issue Template Plugin

$ cd ${REDMINE_ROOT}
$ git clone https://github.com/akiko-pusu/redmine_issue_templates.git plugins/redmine_issue_templates
$ rake redmine:plugins:migrate RAILS_ENV=production

# Issue Charts Plugin

$ cd ${REDMINE_ROOT}
$ git clone https://github.com/masweetman/issue_charts.git plugins/issue_charts
$ bundle install
$ rake redmine:plugins:migrate RAILS_ENV=production

# Redmine gitmike theme

$ cd ${REDMINE_ROOT}/public/themes
$ git clone https://github.com/makotokw/redmine-theme-gitmike.git gitmike

'Docker' 카테고리의 다른 글

도커 생성한 컨테이너 이미지 삭제  (0) 2020.06.14
도커 우분투 서버 타임존 설정  (0) 2020.06.10
Docker Ubuntu+NGINX+uWSGI+flask  (0) 2018.01.24
docker, rancher 설치  (0) 2018.01.22
Posted by 앤비
,