LoginSignup
4
6

More than 5 years have passed since last update.

docker-compose で sameersbn/redmine イメージから redmine を立ち上げる

Posted at

検証で必要だったのでやったら少しはまったのでメモしておきます。

docker-compose.yml の作成。
mysql コンテナ側にも DB_NAME/DB_USER/DB_PASS を指定して、データベースとユーザーを作成しておく必要あり。

$ vi docker-compose.yml
version: "2"
services:
  mysql:
    image: sameersbn/mysql:latest    
    volumes:
      - /srv/docker/redmine/mysql:/var/lib/mysql
    environment:
      - DB_NAME=redmine_production
      - DB_USER=redmine
      - DB_PASS=password
  app:
    image: sameersbn/redmine:3.3.2-1
    volumes:
      - /srv/docker/redmine/redmine:/home/redmine/data
    environment:
      - DB_HOST=mysql
      - DB_NAME=redmine_production
      - DB_USER=redmine
      - DB_PASS=password
    ports:
      - 3000:80

docker-compose up -d する。

# docker-compose up -d
Creating network "redmine_default" with the default driver
Creating redmine_app_1
Creating redmine_mysql_1

ここまでやると、Redmine が立ち上がる。

# curl localhost:3000 | grep Redmine | head -1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3758    0  3758    0     0   163k      0 --:--:-- --:--:-- --:--:--  159k
<title>Redmine</title>
4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6