Project

General

Profile

Feature #33207 ยป 0001-Add-Dockerfile-to-make-it-easier-to-try-Redmine-with.patch

Go MAEDA, 2020-03-29 10:47

View differences:

.dockerignore
1
.bundle
2
Gemfile.local
3
Gemfile.lock
4
config/configuration.yml
5
config/database.yml
6
db/*.sqlite3
7
files
8
log
9
tmp
Dockerfile
1
FROM ruby:2.6-slim
2

  
3
WORKDIR /var/lib/redmine
4

  
5
RUN set -eux; \
6
    apt-get update; \
7
    apt-get install -y -q --no-install-recommends build-essential libsqlite3-dev ghostscript imagemagick
8

  
9
COPY . .
10

  
11
RUN set -uex; \
12
    mkdir files logs tmp; \
13
    for env in development production test; do \
14
        echo "$env:" >> config/database.yml; \
15
        echo "  adapter: sqlite3" >> config/database.yml; \
16
        echo "  database: db/redmine_$env.sqlite3" >> config/database.yml; \
17
        echo >> config/database.yml; \
18
    done
19

  
20
RUN set -uex; \
21
    bundle install; \
22
    bin/rails generate_secret_token
23

  
24
EXPOSE 3000
25
CMD set -uex; \
26
    bin/rails db:migrate redmine:plugins; \
27
    bin/rails server -b 0.0.0.0
doc/INSTALL
96 96

  
97 97
Please do not enter your SMTP settings in environment.rb.
98 98

  
99
== Quickly launch Redmine trial environment with Docker
100

  
101
You can use Docker to quickly set up a Redmine environment for a trial. 
102

  
103
1. Uncompress the program archive
104

  
105
2. Build a Docker image by running:
106
     docker build -t redmine_trial .
107

  
108
3. Launch Redmine in a new Docker container by running:
109
     docker run -it -p 3000:3000 -e RAILS_ENV=production redmine_trial
110

  
111
   Once Redmine has started, point your browser to http://localhost:3000/
112
   You should now see the application welcome page.
113

  
114
4. Delete the container and image after have played with Redmine:
115
     docker container rm CONTAINER_ID
116
     docker image rm redmine_trial
117

  
99 118
== References
100 119

  
101 120
* http://www.redmine.org/wiki/redmine/RedmineInstall
    (1-1/1)