docker Installing redmine Steps

  • 2021-07-22 12:06:28
  • OfStack

Download the image (optional steps, which will be automatically installed in steps 3 and 4 when skipped)


docker pull docker.io/sameersbn/redmine
docker pull docker.io/sameersbn/postgresql

Start SQL


docker run --name=postgresql-redmine -d --env='DB_NAME=redmine_production' --env='DB_USER=redmine' --env='DB_PASS=password' --restart=always --volume=/srv/docker/redmine/postgresql:/var/lib/postgresql sameersbn/postgresql

Start Redmine


docker run --name=redmine -d --link=postgresql-redmine:postgresql --publish=10083:80 --env='REDMINE_PORT=10083' --restart=always --volume=/srv/docker/redmine/redmine:/home/redmine/data sameersbn/redmine

Content extension

Installing Redmine with Docker

Deploy a database container

Redmine depends on databases. We also use containers to deploy related databases. Here, we can use PostgreSQL database and MySQL database, which are as follows

Command installation:

PostgreSQL


docker run -d --name some-postgres -e POSTGRES_PASSWORD=secret -e POSTGRES_USER=redmine postgres

MySQL


docker run -d --name some-mysql -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=redmine mysql

name and password in the command can be specified by themselves, which are container name and database password respectively.

Deploy Redmine

The following command connects to the PostgresSQL database


docker run -d --name redmine -e REDMINE_DB_PASSWORD=secret -p 3000:3000 -v /my/own/datadir:/usr/src/redmine/files --link some-postgres:postgres redmine

At this point, the redmine service has been accessed at port 3000 of the native IP address.


Related articles: