[RUBY] Redmine on Docker


This article is used for explanation in the video (https://youtu.be/-DrdYw8fHwc) This is an article of the slides. Please see it together with the video. -DrdYw8fHwc

Middleware configuration

  1. OS : CentOS 7.8
  2. Web service: Apache 2.4.6
  3. App language: Ruby 2.4
  4. DB service: MariaDB 10.4.3
  5. Redmine : Redmine 4.1

Prepare with Dockerfile

#Use the image of centos7
FROM centos:7
LABEL maintainer=Takemi

SHELL ["/bin/bash", "-o", "pipefail", "-c"]"

#Performing cumulative updates
RUN yum -y upgrade

#If the takemi user does not exist, add the user
RUN echo 'make user takemi'
RUN adduser -m takemi;echo "takemi:takemi123" | chpasswd;

#ssh installation
RUN yum install -y openssh-server
RUN systemctl enable sshd

#Apache installation
RUN yum install -y httpd
RUN systemctl enable httpd

#MariaDB installation
RUN curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash
RUN yum install -y MariaDB-server MariaDB-devel MariaDB-shared
RUN systemctl enable mariadb

#ruby installation preparation
RUN yum -y groupinstall "Development Tools"
RUN yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel
RUN yum -y install httpd-devel
RUN yum -y install ImageMagick ImageMagick-devel ipa-pgothic-fonts
RUN curl -O https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
RUN tar xf ruby-2.4.1.tar.gz
WORKDIR /root/ruby-2.4.1
RUN ./configure --disable-install-doc
RUN make
RUN make install
RUN gem install bundler --no-rdoc --no-ri
		> docker build -t redmine .

What you do with Dockerfile!

  1. OS image construction
  2. OS update
  3. Issuing root user password
  4. General user creation, password issuance
  5. Install ssh
  6. Install Apache
  7. MariaDB installation
  8. Install Ruby

DB settings

Add DB root user

root > mysql
mysql > GRANT ALL PRIVILEGES ON *.* TO 'takemi'@'localhost' IDENTIFIED BY 'takemi123' WITH GRANT OPTION;

Install Redmine

root > cd /var/www
root > svn co https://svn.redmine.org/redmine/branches/4.1-stable redmine-4.1
user > cd redmin-4.1
user > cd config
user > cp configuration.yml.example configuration.yml
user > cp database.yml.example database.yml
user > vi database.yml
	username: takemi
	password: "takemi123"

root > cd /var/www
root > chown -R takemi:takemi redmine-4.1
root > vi /etc/group

root > cd /var/www/redmine-4.1
root > gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'
root > bundle install --without development test --path vendor/bundle
root > bundle exec rake generate_secret_token
root > gem install passenger --no-rdoc --no-ri
root > passenger-install-apache2-module --auto
root > passenger-install-apache2-module --snippet
root > vi /etc/httpd/conf.d/redmine.conf
root > systemctl restart httpd

user > mysql -p
	create database redmine default character set utf8;
user > RAILS_ENV=production bundle exec rake db:migrate
user > RAILS_ENV=production REDMINE_LANG=ja bundle exec rake redmine:load_default_data

Redmine setup

Access with a browser! See the video for details!

Recommended Posts

Redmine on Docker
Liberty on Docker
Try using Redmine on Mac docker
Build Redmine code reading environment on Docker
Launched Redmine with Docker on Raspberry Pi 3
Docker installation on CentOS 6
python notes on docker
Install Docker on Manjaro
Install Redmine 4.1.1 on CentOS 7
Docker installation on WSL2
Run phpunit on Docker
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO
Install Docker on Ubuntu Server 20.04
Run openvpn on Docker (windows)
Try Docker on Windows 10 Home
Oracle Java 8 on Docker Ubuntu
Hosted Apicurio Studio on Docker
Install docker on AWS EC2
Install openjdk8 on Docker image (Debian)
Install Docker on AWS Ubunt 20.04 LTS
Run SSE (Server-Sent-Event) samples on docker
Steps to run docker on Mac
Run puppeteer-core on Heroku (Docker edition)
Use Docker Compose on Windows 10 Home
JMeter Client/Server Remote Testing on Docker
To beginners launching Docker on AWS
Run React on a Docker container
Docker on NILFS2 filesystem (for raspbianOS)
Run the AWS CLI on Docker
How to run JavaFX on Docker
Run GUI application on Docker container
Build Clang x VSCode on Docker (1)
Deploy Flask's Docker image on Heroku
Use Docker on your M1 Mac
Rails on Docker environment construction procedure
Deploy Rails on Docker to heroku
Use Docker CE (official) on CentOS 8
Build Unity development environment on docker
Easily try C # 9 (.NET 5) on Docker
docker memo
Windows Docker: Disk pressure on WSL files
Install docker and docker-compose on Alpine Linux
kubernetes + docker
spring × docker
About Docker
I tried running Docker on Windows Server 2019
Launch multiple Redmine instances on one server
Customize OpenFOAM v8 Docker Image on Mac
Run NordVPN on Docker (Windows) Ubuntu container
Run Embulk on Docker to convert files
Docker Intellij
I installed Docker on my Raspberry Pi 3
Use docker in proxy environment on ubuntu 20.04.1
[Now] Let's Redmine with Docker Compose with Let's Encrypt
Introducing Docker Desktop for Windows on WSL2
Docker installation
About Docker
Docker command
Microservices 101-I tried putting Docker on Ubuntu-